diff options
author | Junio C Hamano <junkio@cox.net> | 2005-09-22 00:55:22 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-09-22 18:09:07 -0700 |
commit | c8b48ba4767ff9da19ef4f41f8d870f11742d833 (patch) | |
tree | 3d0e6f09fd3189d9b684d064529eb81c5128a517 /git-octopus.sh | |
parent | f8ff0c0641a14770a2214fffbd4271b1ea3a0d61 (diff) | |
download | git-c8b48ba4767ff9da19ef4f41f8d870f11742d833.tar.gz git-c8b48ba4767ff9da19ef4f41f8d870f11742d833.tar.xz |
Prettyprint octopus merge message.
Including the current branch in the list of heads being merged
was not a good idea, so drop it. And shorten the message by
grouping branches and tags together to form a single line.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-octopus.sh')
-rwxr-xr-x | git-octopus.sh | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/git-octopus.sh b/git-octopus.sh index 521cc6f36..abc682025 100755 --- a/git-octopus.sh +++ b/git-octopus.sh @@ -27,7 +27,7 @@ test "$(git-diff-index --cached "$head")" = "" || # MRC is the current "merge reference commit" # MRT is the current "merge result tree" -MRC=$head MSG= PARENT="-p $head" +MRC=$head PARENT="-p $head" MRT=$(git-write-tree) CNT=1 ;# counting our head NON_FF_MERGE=0 @@ -44,8 +44,6 @@ do CNT=`expr $CNT + 1` PARENT="$PARENT -p $SHA1" - MSG="$MSG - $REPO" if test "$common,$NON_FF_MERGE" = "$MRC,0" then @@ -84,20 +82,9 @@ case "$CNT" in 1) echo "No changes." exit 0 ;; -2) - echo "Not an Octopus; making an ordinary commit." - MSG="Merge "`expr "$MSG" : '. \(.*\)'` ; # remove LF and TAB - ;; -*) - # In an octopus, the original head is just one of the equals, - # so we should list it as such. - HEAD_LINK=`readlink "$GIT_DIR/HEAD"` - MSG="Octopus merge of the following: - - $HEAD_LINK from .$MSG" - ;; esac -result_commit=$(echo "$MSG" | git-commit-tree $MRT $PARENT) +result_commit=$(git-fmt-merge-msg <"$GIT_DIR/FETCH_HEAD" | + git-commit-tree $MRT $PARENT) echo "Committed merge $result_commit" echo $result_commit >"$GIT_DIR"/HEAD git-diff-tree -p $head $result_commit | git-apply --stat |