Skip to content
  • Christian Couder's avatar
    replace: check mergetags when using --graft · 25a05a8c
    Christian Couder authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When using --graft, with a mergetag in the original
    commit, we should check that the commit pointed to by
    the mergetag is still a parent of then new commit we
    create, otherwise the mergetag could be misleading.
    
    If the commit pointed to by the mergetag is no more
    a parent of the new commit, we could remove the
    mergetag, but in this case there is a good chance
    that the title or other elements of the commit might
    also be misleading. So let's just error out and
    suggest to use --edit instead on the commit.
    
    Signed-off-by: default avatarChristian Couder <chriscool@tuxfamily.org>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    25a05a8c