Skip to content
  • Johannes Schindelin's avatar
    filter-branch: Big syntax change; support rewriting multiple refs · dfd05e38
    Johannes Schindelin authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    We used to take the first non-option argument as the name for the new
    branch.  This syntax is not extensible to support rewriting more than just
    HEAD.
    
    Instead, we now have the following syntax:
    
    	git filter-branch [<filter options>...] [<rev-list options>]
    
    All positive refs given in <rev-list options> are rewritten.  Yes,
    in-place.  If a ref was changed, the original head is stored in
    refs/original/$ref now, for your inspecting pleasure, in addition to the
    reflogs (since it is easier to inspect "git show-ref | grep original" than
    to inspect all the reflogs).
    
    This commit also adds the --force option to remove .git-rewrite/ and all
    refs from refs/original/ before filtering.
    
    Signed-off-by: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    dfd05e38