Control-Freak - LFS - Misleading/incorrect pre-receive hook message

Issue #168 resolved
Jim Howard created an issue

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,

  1. Configure the General Policy > Large File Policy to Block all large files and enter some value (I used 500000)
  2. In a controlled repository, create a directory containing a space (I created a directory called “Confusion Reigns Supreme”)
  3. Put a large file (larger than the value specified in #1 above, of course) into that directory and commit it
  4. 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)

  1. Julius Davies [bit-booster.com] 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.

  2. Julius Davies [bit-booster.com] repo owner

    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.

  3. Log in to comment