summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-25 21:58:45 -0700
committerJunio C Hamano <gitster@pobox.com>2015-03-26 10:23:14 -0700
commitbcc3563436526df46cacf2cd627fef5b013eaf03 (patch)
tree7cf2a5103f62f0eb81f21077927a290e49f205e0 /git-cvsimport.perl
parentbca181109d6f054d525c71a84963bbdc1f0c40bf (diff)
downloadgit-jc/merge-deprecate-old-syntax.tar.gz
merge: deprecate 'git merge <message> HEAD <commit>' syntaxjc/merge-deprecate-old-syntax
We had this in "git merge" manual for eternity: 'git merge' <msg> HEAD <commit>... [This] syntax (<msg> `HEAD` <commit>...) is supported for historical reasons. Do not use it from the command line or in new scripts. It is the same as `git merge -m <msg> <commit>...`. I wanted to see how much damage we would incur to people by checking what the damage to _our_ system, including the test scripts, if we dropped the support for the syntax. The last time I tried this, I thought that replacing the use of this syntax in "git pull" with its obvious and trivial rewrite 'git merge -m <msg> <commit>' broke some output, and that is the primary reason why I stayed away from trying this again, but it no longer seems to be the case with today's code for some reason. There are quite a few fallouts in the test scripts, and it turns out that "git cvsimport" also uses this old syntax to record a merge. Judging from this result, I would not be surprised if dropping the support of the old syntax broke scripts people have written and been relying on for the past ten years. But at least we can start the deprecation process by throwing a warning message when the syntax is used. With luck, we might be able to drop the support in a few years. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 73d367cea8..82ecb0343a 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -1162,7 +1162,7 @@ if ($orig_branch) {
die "Fast-forward update failed: $?\n" if $?;
}
else {
- system(qw(git merge cvsimport HEAD), "$remote/$opt_o");
+ system(qw(git merge -m cvsimport), "$remote/$opt_o");
die "Could not merge $opt_o into the current branch.\n" if $?;
}
} else {