- edited description
Control-Freak - LFS - Misleading/incorrect pre-receive hook message
ControlFreak incorrectly handles file paths including spaces (not uncommon on Windows). Rather than listing the full path to any rejected file, only the path segment up to the first space is output.
To reproduce,
- Configure the General Policy > Large File Policy to Block all large files and enter some value (I used 500000)
- In a controlled repository, create a directory containing a space (I created a directory called “Confusion Reigns Supreme”)
- Put a large file (larger than the value specified in
above, of course) into that directory and commit it#1 - On the attempt to push the change, ControlFreak will not list the full path to the too-large file, but rather the path up to the first space:
Push: Not all refs have been pushed.;
C:\Work\migrate\tppwbblfs> git.exe push --porcelain --progress --recurse-submodules=check origin refs/heads/20.3:refs/heads/20.3
Locking support detected on remote "origin". Consider enabling it with:
\$ git config lfs.https://bb.eng.venafi.com/ops/tppwbblfs.git/info/lfs.locksverify true
Delta compression using up to 2 threads
Total 7 (delta 3), reused 0 (delta 0)
remote: Control Freak v2020.05.05: Push rejected.
remote:
remote: Control Freak v2020.05.05
remote: -----
remote: Push rejected.
remote: All files larger than 500000 bytes are not permitted.
remote: The following file is too large:
remote:
remote: Confusion (2778128 bytes)
remote:
remote: You can push large files to this repository using 'git lfs':
remote: git lfs track <path>
remote:
failed to push some refs to 'ssh://git@bb.eng.venafi.com:7999/ops/tppwbblfs'
To ssh://bb.eng.venafi.com:7999/ops/tppwbblfs
! refs/heads/20.3:refs/heads/20.3 [remote rejected] (pre-receive hook declined)
'20.3' rejected (non-fast-forward)
What should have been listed is of course the path to the errant file (“Confusion Reigns Supreme/hugeFile.mondo”)
The existing display makes it very difficult to track down/resolve the source of the rejected push!
Comments (5)
-
Account Deactivated reporter -
repo owner Thanks for this bug report! We’re about to publish a very exciting release tonight with a number of major bug fixes, and then we’ll start looking at this.
-
repo owner - changed status to open
-
repo owner - changed title to Control-Freak - LFS - Misleading/incorrect pre-receive hook message
-
repo owner - changed status to resolved
Fixed in v2020.11.17. The large-file blocking logic had a bug in it with files that had spaces in their name or path.
- Log in to comment
Attempted to improve message formatting…