Skip to content
  • Junio C Hamano's avatar
    merge: deprecate 'git merge <message> HEAD <commit>' syntax · d45366e8
    Junio C Hamano authored
    
    
    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>...`.
    
    With the update to "git merge" to make it understand what is
    recorded in FETCH_HEAD directly, including Octopus merge cases, we
    now can rewrite the use of this syntax in "git pull" with a simple
    "git merge FETCH_HEAD".
    
    Also 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: default avatarJunio C Hamano <gitster@pobox.com>
    d45366e8