[go: up one dir, main page]

Skip to content

LFS pre-receive hook message is unclear

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

If you push a with an object missing, the pre-receive hook rejects the push. The message is hard to spot, and not super helpful, particularly for a user unfamiliar with LFS. It took @ernstvn and I a while to work it out while testing LFS with geo.

To reproduce, clone https://gitlab.com/nick.thomas/test-lfs and try to push a change or two a new remote.

This shows the issue that another-file.lfs is in the repo, but isn't tracked. So an inexperienced LFS user can see it in the file system but don't know that it isn't being tracked or how to fix the situation.

Git LFS: (2 of 3 files) 28 B / 32 B
LFS upload missing objects:
  (missing) another-file.lfs (64fc7da9eafea5e011f98d6cce8340fd7e812ce81a92259413d2f8b527c84f8c)
Counting objects: 18, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (18/18), 6.26 KiB | 6.26 MiB/s, done.
Total 18 (delta 4), reused 18 (delta 4)
remote: GitLab: LFS objects are missing. Ensure LFS is properly set up or try a manual "git lfs push --all".
To gitlab.example.com:jramsay/foo.git
 ! [remote rejected] master -> master (pre-receive hook declined)

Proposal

  1. Make our message stand out more like our MR feedback.
  2. Provide more helpful troubleshooting tips
remote:
remote: Error: LFS objects are missing. Ensure LFS is properly setup or try a manual "git lfs push --all"
remote:
Edited by 🤖 GitLab Bot 🤖