What does git filter branch do without arguments?

What does it do git filter-branchwithout arguments?

I ran this on my repo, accidentally hitting it prematurely.

+3
source share
3 answers

Nothing. He seemed to figure out the hashes and didn't find any changes.

+1
source

The filter branch checks to see if there is any rewriting of the commits that are output using the git rev-listpassed arguments that it passes. With no arguments to pass, rev-list uses HEAD, the current check.

Along with any changes specified on the command line, the filter branch also bakes local overrides from .git/info/graftsand git replace.

So, to orphan the current check, you can git rev-parse @ >.git/info/grafts; git filter-branch

0

, git filter-branch:

( ) , :

git filter-branch --parent-filter 'sed "s/^\$/-p <graft-id>/"' HEAD

git 2.6.4 git 2.7 ( 2015)

. commit 348d4f2 (06 2015 .) (peff).
( Junio ​​C Hamano - gitster - commit 2e5adec, 04 2015 .)

filter-branch: /,

, , filter-branch .
: , .

This can greatly accelerate cases when we only change fixation objects (for example, we cement the vaccine in place) .
Here are the numbers from the recently added perfection test:

Test                  HEAD^              HEAD
---------------------------------------------------------------
7000.2: noop filter   13.81(4.95+0.83)   5.43(0.42+0.43) -60.7%
0
source

All Articles