Skip to content

Commit

Permalink
git-merge: warn when -m provided on a fast forward
Browse files Browse the repository at this point in the history
Warn the user that the "-m" option is ignored in the case of a fast
forward.  That may save some confusion in the case where the user
doesn't know about fast forwards yet and may not realize that the
behavior here is intentional.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
J. Bruce Fields authored and Junio C Hamano committed Mar 12, 2007
1 parent 60fa08e commit be242d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,12 @@ f,*)
git-update-index --refresh 2>/dev/null
new_head=$(git-rev-parse --verify "$1^0") &&
git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
finish "$new_head" "Fast forward" || exit
msg="Fast forward"
if test -n "$have_message"
then
msg="$msg (no commit created; -m option ignored)"
fi
finish "$new_head" "$msg" || exit
dropsave
exit 0
;;
Expand Down

0 comments on commit be242d5

Please sign in to comment.