• L
    git-branch: add options and tests for branch renaming · c976d415
    Lars Hjemli 提交于
    Extend git-branch with the following options:
    
      git-branch -m|-M [<oldbranch>] newbranch
    
    The -M variation is required to force renaming over an exsisting
    branchname.
    
    This also indroduces $GIT_DIR/RENAME_REF which is a "metabranch"
    used when renaming branches. It will always hold the original sha1
    for the latest renamed branch.
    
    Additionally, if $GIT_DIR/logs/RENAME_REF exists, all branch rename
    events are logged there.
    
    Finally, some testcases are added to verify the new options.
    Signed-off-by: NLars Hjemli <hjemli@gmail.com>
    Signed-off-by: NJunio C Hamano <junkio@cox.net>
    c976d415
builtin-branch.c 8.6 KB