Hm, could it be that "git diff --cached" compares the index to the old
version of the commit, rather than to the parent (of both the old and
new version) of the commit, when making an amend?

In that case, how can the hook know, and compare against the right
version?  Of course, the hook doesn't get any arguments at all, so it
has to guess what's going on, as per usual in git land...

As a kluge I could check everything _again_ in the post-commit hook.
At that time it is at least obivious (I hope!!!) what the new commit
contains and which its parents are.
  • Swi... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
    • ... Martin Stjernholm, Roxen IS @ Pike developers forum
      • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
        • ... Martin Stjernholm, Roxen IS @ Pike developers forum
      • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum

Reply via email to