From: Junio C Hamano Date: Thu, 30 Mar 2017 21:07:13 +0000 (-0700) Subject: Merge branch 'jc/merge-drop-old-syntax' X-Git-Tag: v2.13.0-rc0~49 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1fdbfc443e9ef702df9a305231e15f020920c87a Merge branch 'jc/merge-drop-old-syntax' Stop supporting "git merge HEAD " syntax that has been deprecated since October 2007, and issues a deprecation warning message since v2.5.0. * jc/merge-drop-old-syntax: merge: drop 'git merge HEAD ' syntax --- 1fdbfc443e9ef702df9a305231e15f020920c87a diff --cc Documentation/git-merge.txt index ca3c27b88a,81a7f24def..04fdd8cf08 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@@ -10,12 -10,9 +10,11 @@@ SYNOPSI -------- [verse] 'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] - [-s ] [-X ] [-S[]] + [-s ] [-X ] [-S[]] + [--[no-]allow-unrelated-histories] [--[no-]rerere-autoupdate] [-m ] [...] - 'git merge' HEAD ... 'git merge' --abort +'git merge' --continue DESCRIPTION ----------- diff --cc builtin/merge.c index 7554b8d412,967b83cfc9..95572b1810 --- a/builtin/merge.c +++ b/builtin/merge.c @@@ -43,10 -41,8 +43,9 @@@ struct strategy }; static const char * const builtin_merge_usage[] = { - N_("git merge [options] [...]"), + N_("git merge [] [...]"), - N_("git merge [] HEAD "), N_("git merge --abort"), + N_("git merge --continue"), NULL }; @@@ -634,11 -632,12 +633,12 @@@ static void write_tree_trivial(struct o static int try_merge_strategy(const char *strategy, struct commit_list *common, struct commit_list *remoteheads, - struct commit *head, const char *head_arg) + struct commit *head) { static struct lock_file lock; + const char *head_arg = "HEAD"; - hold_locked_index(&lock, 1); + hold_locked_index(&lock, LOCK_DIE_ON_ERROR); refresh_cache(REFRESH_QUIET); if (active_cache_changed && write_locked_index(&the_index, &lock, COMMIT_LOCK)) @@@ -1117,11 -1149,12 +1099,10 @@@ static struct commit_list *collect_pare int cmd_merge(int argc, const char **argv, const char *prefix) { - unsigned char result_tree[20]; - unsigned char stash[20]; - unsigned char head_sha1[20]; + struct object_id result_tree, stash, head_oid; struct commit *head_commit; struct strbuf buf = STRBUF_INIT; - const char *head_arg; - int flag, i, ret = 0, head_subsumed; + int i, ret = 0, head_subsumed; int best_cnt = -1, merge_was_ok = 0, automerge_was_ok = 0; struct commit_list *common = NULL; const char *best_strategy = NULL, *wt_strategy = NULL;