Merge branch 'jc/merge-drop-old-syntax'
authorJunio C Hamano <gitster@pobox.com>
Thu, 30 Mar 2017 21:07:13 +0000 (14:07 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Mar 2017 21:07:13 +0000 (14:07 -0700)
Stop supporting "git merge <message> HEAD <commit>" 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 <message> HEAD <commit>' syntax

1  2 
Documentation/git-merge.txt
builtin/merge.c
index ca3c27b88a4ea0dde17ed2e7f260ca6158a50073,81a7f24defccd16da75e83d4832b072277e2de51..04fdd8cf086db6413a01421c306a80c9583f7fa4
@@@ -10,12 -10,9 +10,11 @@@ SYNOPSI
  --------
  [verse]
  'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
 -      [-s <strategy>] [-X <strategy-option>] [-S[<key-id>]]
 +      [-s <strategy>] [-X <strategy-option>] [-S[<keyid>]]
 +      [--[no-]allow-unrelated-histories]
        [--[no-]rerere-autoupdate] [-m <msg>] [<commit>...]
- 'git merge' <msg> HEAD <commit>...
  'git merge' --abort
 +'git merge' --continue
  
  DESCRIPTION
  -----------
diff --cc builtin/merge.c
index 7554b8d4127ada8261d1f913c6215e93ca42ef7d,967b83cfc99b49c832478fa930e7d777cf2e61ab..95572b18108d6c51391c6527359657cd37329bd6
@@@ -43,10 -41,8 +43,9 @@@ struct strategy 
  };
  
  static const char * const builtin_merge_usage[] = {
 -      N_("git merge [options] [<commit>...]"),
 +      N_("git merge [<options>] [<commit>...]"),
-       N_("git merge [<options>] <msg> HEAD <commit>"),
        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;