Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@fieldses.org>2007-03-11 19:28:56 +0300
committerJunio C Hamano <junkio@cox.net>2007-03-12 09:49:20 +0300
commitbe242d576c4457bec1cb748b144eb287e98ac0b5 (patch)
treeb580a39797889f79ca34f7c230786c1dbe51c26e /git-merge.sh
parent60fa08ed617dd148a9843bfdef2dfecf2ef60123 (diff)
git-merge: warn when -m provided on a fast forward
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>
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-xgit-merge.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-merge.sh b/git-merge.sh
index 4afcd95316..6ce62c860a 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -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
;;