Egor Andreevich
10/01/2025, 1:15 PMgt submit passes the --no-verify arg to git, which skips our git LFS hooks:
$ gt submit --stack
git push -u origin --force-with-lease --progress [branch names] --no-verify --atomic
According to the docs, --verify should be the default option, so not sure if it's a bug or I've got a weird global config somewhere. Can you please help me troubleshoot this? Thank you!Pylon
10/01/2025, 1:15 PMgt feedback --with-debug-context <any message>Egor Andreevich
10/01/2025, 1:18 PMgt feedback --with-debug-context <any message>!Pylon
10/01/2025, 1:53 PMEgor Andreevich
10/01/2025, 2:08 PMEgor Andreevich
10/01/2025, 2:09 PMPylon
10/01/2025, 6:46 PMPylon
10/01/2025, 7:34 PMgt submit --debug below. So the push command itself having the --no-verify should not impact the hook triggering. I also tested this with --no-verify explicitely in my gt submit command and saw it did not in fact run.Pylon
10/01/2025, 7:35 PM--no-verify ?Egor Andreevich
10/02/2025, 12:59 PMDid a hook not run that you had expected to, or were you just thrown off by the debug log showingYeah, we've got some git LFS hooks in our project, and the hook that's supposed to upload files to LFS didn't run, so the push complained about unknown git LFS references. I believe that was the pre-push hook, but I'll debug some more to make sure, will get back to you!?--no-verify
Egor Andreevich
10/02/2025, 1:50 PMecho statement to the pre-push hook, and when I run gt submit I don't see the printout. gt submit then runs git push, which fails because of --no-verify (we also have a server-side pre-receive hook that verifies that git LFS objects were properly uploaded, and the hook rejects the push because pre-push didn't run on the client side and didn't upload the objects). If I simply execute the git push command that Graphite tried to run, but without --no-verify, I do see the printout from the pre-push hook, and the push doesn't get rejected. So for some reason the pre-push hook does not get executed for me. Are you on 1.7.0?Pylon
10/02/2025, 2:25 PM.git/hooks/pre-push
#!/bin/sh
echo "=== PRE-PUSH HOOK CALLED ==="
echo "Hook received arguments: $@"
echo "Current branch: $(git branch --show-current)"
echo "this time with the flag"
echo "==========================="
# Exit 0 to allow the push, or exit 1 to block it
exit 0
This should help us validate if the prepush is working in general or not~Egor Andreevich
10/02/2025, 2:59 PMEgor Andreevich
10/03/2025, 2:07 PM.git/hooks/pre-push, and it indeed seems to execute before submit's git push. This makes me think there's an issue with how hooks for our project are configured on my machine, I'll dig into it, but doesn't look like there's anything wrong on Graphite's side. Thanks for helping me investigate!Egor Andreevich
10/03/2025, 2:39 PMgt submit?Pylon
10/03/2025, 3:03 PM