Re: [PATCH] Add git-filter-branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 6 Jun 2007, Johannes Sixt wrote:

> Johannes Schindelin wrote:
> > Of course, it would be even more so if the target branch name was
> > "filtered", overrideable by "--target <name>".
> 
> My plan for this is:
> 
> 1. run the rev-list args ("$@") through rev-parse
> 2. pick only the positive ones (/^[a-z0-9]{40}$/)
> 3. filter show-ref against the result of 2.
> 4. foreach ref in the result of 3. install a refs/rewritten/$ref
>    with the mapped id if and only if the mapped id is different
>    from the original id of $ref.
> 
> Then you can, for example, 'git filter-branch --all' to rewrite all
> branches.

That sounds really sensible. For (2), I suggest "git-rev-parse 
--symbolic", though. And maybe you want to make sure that there were no 
invalid branch names, i.e. "git-filter-branch next~2". (Otherwise, you 
would try to create refs/filtered/next~2 after filtering all commits.)

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux