Re: [PATCH v2 3/4] merge: make prepare_to_commit responsible for write_merge_state

2014-01-10 Thread Junio C Hamano
Ryan Biesemeyer r...@yaauie.com writes: When merging, make the prepare-commit-msg hook have access to the merge state in order to make decisions about the commit message it is preparing. What information is currently not available, and if available how would that help the hook to formulate a

Re: [PATCH v2 3/4] merge: make prepare_to_commit responsible for write_merge_state

2014-01-10 Thread Junio C Hamano
Ryan Biesemeyer r...@yaauie.com writes: + write_script $HOOK -EOF + if [ -s $(git rev-parse --git-dir)/MERGE_HEAD ]; then + exit 0 + else + exit 1 + fi + EOF The script can be a one-liner write_scirpt $HOOK -\EOF test -s $(git

[PATCH v2 3/4] merge: make prepare_to_commit responsible for write_merge_state

2014-01-08 Thread Ryan Biesemeyer
When merging, make the prepare-commit-msg hook have access to the merge state in order to make decisions about the commit message it is preparing. Since `abort_commit` is *only* called after `write_merge_state`, and a successful commit *always* calls `drop_save` to clear the saved state, this