Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone fails #8

Open
AgostinoSturaro opened this issue Apr 8, 2023 · 7 comments
Open

Clone fails #8

AgostinoSturaro opened this issue Apr 8, 2023 · 7 comments

Comments

@AgostinoSturaro
Copy link

@markol I can't get this repo to clone on Windows.

$ git clone https://github.com/markol/machines.git
Cloning into 'machines'...
remote: Enumerating objects: 4104, done.
remote: Counting objects: 100% (417/417), done.
remote: Compressing objects: 100% (350/350), done.
remote: Total 4104 (delta 79), reused 67 (delta 67), pack-reused 3687
Receiving objects: 100% (4104/4104), 5.39 MiB | 1.09 MiB/s, done.
Resolving deltas: 100% (854/854), done.
Updating files: 100% (3921/3921), done.
Downloading windows/lib32/libALURE32-static.a (178 KB)
Error downloading object: windows/lib32/libALURE32-static.a (b16e0fd): Smudge error: Error downloading windows/lib32/libALURE32-static.a (b16e0fdd12ce68f45d4c5d932c331fb81737791fdfb06d5ab1cf94d9a9e63c91): batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.

Errors logged to 'C:\Users\Agostino\Documents\Repos\machines\.git\lfs\logs\20230408T141120.3307106.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: windows/lib32/libALURE32-static.a: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
@Kaffeine
Copy link

Kaffeine commented Apr 8, 2023

See also: WiredForWar#19

@Kaffeine
Copy link

Kaffeine commented Apr 8, 2023

Okay, I have an idea. Here is an archive of the cloned repository with LFS files: machines-repository.zip

  1. Extract the archive
  2. Go to the extracted machines directory
  3. Run git chechout . so git populate the directory with files.
  4. Run git pull to verify that the archive is identical to the master branch of this repository.

At this point you have a repository identical to what you would get if clone this repository on your own (with LFS data).


Later on, you may want to add a fork repository with some important fixes.

  1. Run git remote add wfw https://github.com/WiredForWar/machines.git to add the fork to the known remotes.
  2. After that run git fetch wfw to download the branches from the fork.
  3. After that checkout the wanted branch:
    a) Run git checkout kaffeine/fixed-upstream to get the bare minimum of the critical fixes.
    OR
    b) Run git checkout dev to get the updated codebase with a number of fixes and improvements.

Consider joining our Discord server: https://discord.gg/nXBdB983hn 👀 😀

@AgostinoSturaro
Copy link
Author

AgostinoSturaro commented Apr 9, 2023

I after extracting the zip and running git chechout ., I get

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   data/machstrg.xml
        modified:   data/shaders/120/2DShading.fggls
        modified:   data/shaders/120/2DShading.vxgls
        modified:   data/shaders/120/BillboardShading.vxgls
        modified:   data/shaders/120/StandardShading.fggls
        modified:   data/shaders/120/StandardShading.vxgls
        modified:   data/shaders/2DShading.fggls
        modified:   data/shaders/2DShading.vxgls
        modified:   data/shaders/BillboardShading.vxgls
        modified:   data/shaders/StandardShading.fggls
        modified:   data/shaders/StandardShading.vxgls
        modified:   docker/docker_build_img.sh
        modified:   docker/docker_shell.sh
        modified:   windows/icon.ico
        modified:   windows/lib32/libSDL2.dll.a
        modified:   windows/lib32/libSDL2_image.dll.a
        modified:   windows/lib64/libSDL2.dll.a
        modified:   windows/lib64/libSDL2_image.dll.a
        modified:   windows/resource.h

A hard reset to HEAD does not change.
The diff is as follows

$ git diff
diff --git a/data/machstrg.xml b/data/machstrg.xml
old mode 100755
new mode 100644
diff --git a/data/shaders/120/2DShading.fggls b/data/shaders/120/2DShading.fggls
old mode 100755
new mode 100644
diff --git a/data/shaders/120/2DShading.vxgls b/data/shaders/120/2DShading.vxgls
old mode 100755
new mode 100644
diff --git a/data/shaders/120/BillboardShading.vxgls b/data/shaders/120/BillboardShading.vxgls
old mode 100755
new mode 100644
diff --git a/data/shaders/120/StandardShading.fggls b/data/shaders/120/StandardShading.fggls
old mode 100755
new mode 100644
diff --git a/data/shaders/120/StandardShading.vxgls b/data/shaders/120/StandardShading.vxgls
old mode 100755
new mode 100644
diff --git a/data/shaders/2DShading.fggls b/data/shaders/2DShading.fggls
old mode 100755
new mode 100644
diff --git a/data/shaders/2DShading.vxgls b/data/shaders/2DShading.vxgls
old mode 100755
new mode 100644
diff --git a/data/shaders/BillboardShading.vxgls b/data/shaders/BillboardShading.vxgls
old mode 100755
new mode 100644
diff --git a/data/shaders/StandardShading.fggls b/data/shaders/StandardShading.fggls
old mode 100755
new mode 100644
diff --git a/data/shaders/StandardShading.vxgls b/data/shaders/StandardShading.vxgls
old mode 100755
new mode 100644
diff --git a/docker/docker_build_img.sh b/docker/docker_build_img.sh
old mode 100755
new mode 100644
diff --git a/docker/docker_shell.sh b/docker/docker_shell.sh
old mode 100755
new mode 100644
diff --git a/windows/icon.ico b/windows/icon.ico
old mode 100755
new mode 100644
diff --git a/windows/lib32/libSDL2.dll.a b/windows/lib32/libSDL2.dll.a
old mode 100755
new mode 100644
diff --git a/windows/lib32/libSDL2_image.dll.a b/windows/lib32/libSDL2_image.dll.a
old mode 100755
new mode 100644
diff --git a/windows/lib64/libSDL2.dll.a b/windows/lib64/libSDL2.dll.a
old mode 100755
new mode 100644
diff --git a/windows/lib64/libSDL2_image.dll.a b/windows/lib64/libSDL2_image.dll.a
old mode 100755
new mode 100644
diff --git a/windows/resource.h b/windows/resource.h
old mode 100755
new mode 100644

I don't know what that means.
EDIT: solved by running git config core.filemode false

I was just curios to have a look at the code.

Is it fine if I just clone the fork?
EDIT: the fork has the same issue

$ git clone https://github.com/WiredForWar/machines.git
Cloning into 'machines'...
remote: Enumerating objects: 16166, done.
remote: Counting objects: 100% (3927/3927), done.
remote: Compressing objects: 100% (2379/2379), done.
remote: Total 16166 (delta 1802), reused 1885 (delta 1542), pack-reused 12239
Receiving objects: 100% (16166/16166), 12.98 MiB | 1.11 MiB/s, done.
Resolving deltas: 100% (9397/9397), done.
Updating files: 100% (4106/4106), done.
Downloading windows/lib32/libALURE32-static.a (178 KB)
Error downloading object: windows/lib32/libALURE32-static.a (b16e0fd): Smudge error: Error downloading windows/lib32/libALURE32-static.a (b16e0fdd12ce68f45d4c5d932c331fb81737791fdfb06d5ab1cf94d9a9e63c91): batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.

Errors logged to 'C:\Users\Agostino\Documents\Repos\machines\.git\lfs\logs\20230409T204637.5429144.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: windows/lib32/libALURE32-static.a: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

If I do git remote add wfw https://github.com/WiredForWar/machines.git
by the way, not git add remote,
I get this when I try to checkout dev.

$ git checkout dev
error: The following untracked working tree files would be overwritten by checkout:
        cmake/Findenet.cmake
        models/planet/commsat/commsat.csp
        models/planet/commsat/commsat.env
        models/planet/commsat/commsat.psf
        src/libdev/render/Font.cpp
Please move or remove them before you switch branches.
Aborting

@Kaffeine
Copy link

Kaffeine commented Apr 9, 2023

Is it fine if I just clone the fork?

It is fine but it has the same problem. More than that, I think the "LFS quota" is shared between the forks, so they all work and break (until the next month) together at the same time.

It is not technically possible to fork a repo and do not inherit its history (which causes this issue).
Also it would be disrespectful to rewrite the original history in the fork (and also it would break git pull for everyone who already fetched the repo, and also it won't be possible to open Merge Requests to this repo, and also... (many other disadvantages in rewriting the history)).

Try this: https://stackoverflow.com/a/62918371

If you don't want to build the game using @markol instruction (Windows exe on linux/docker in https://github.com/markol/machines/blob/master/README.md) then you don't need and can ignore LFS files. See https://stackoverflow.com/questions/42019529/how-to-clone-pull-a-git-repository-ignoring-lfs

It is possible to make a build on windows but not all game features will work (namely the music and video stretching): https://github.com/WiredForWar/machines/wiki/Build-on-windows-(MinGW)

@Kaffeine
Copy link

Kaffeine commented Apr 9, 2023

EDIT: solved by running git config core.filemode false

Hm, it is the opposite to what suggested on stackoverflow but whatever fixes the issue is good 😃

by the way, not git add remote,

🙈

@Kaffeine
Copy link

Kaffeine commented Apr 9, 2023

I get this when I try to checkout dev.

This is caused by your git reset --hard. Use git checkout dev -f to make git overwrite the files (this is fine).

@AgostinoSturaro
Copy link
Author

This LFS thing is more complex than I imagined.
Thank you. It works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants