I am using git gui and now am trying to write a pre-commit hook (which
analyzes a complete diff).
Adding support for amending is a big problem.
1. There seems to be now information whether the current commit is an amend
and as such, you can not analyze the resulting complete diff (only the
delta to the old commit).
2. There seems to be absolutely no way of determining in the pre-commit,
that it was a amend commit.
3. A workaround would be to try to detect whether the hook was called from
an amend command. Even trying to analyze the process tree fails, though.
When calling pstree I get the following output:
`-git gui
`-wish /usr/lib/git-core/git-gui --
`-pre-commit .git/hooks/pre-commit
So looking at this there is no amend call in the process tree. As such I
expect, that git gui is not using the "standard" amend but has some own way
of amending commits. Is this true?
Is there any way of handling that properly?
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.