Re: git filter-branch --filter-notes/--post-rewrite?

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

 



Thomas Rast writes:
>Johan Herland wrote:
>
>> Looking at git-rebase.sh (where it _is_ implemented), it seems to be a 
>> matter of feeding "old_sha1 new_sha1" pairs into a "rewritten" file, and 
>> then passing that file to the stdin of "git notes copy --for-rewrite=filter-
>> branch" (followed by passing the same file to the "post-rewrite" hook).

That appends to the notes history instead of replacing it, which seems
broken to me.  So I'm doing fast-export <notes> | edit; fast-import.

> I had a patch for this back when post-rewrite was invented,
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/139919/focus=139917
> 
> but Hannes replied that it should grow a real notes filter, and while
> I dropped it there, I tend to agree with him.  Feel free to pick it up
> again.

A notes filter would be nice, but I don't understand why there's no
post-rewrite hook or option to let us get at the rewrite info before
it is deleted.  For one thing a notes filter might not do just what is
intended (as above), but one might want the mapping info for other
things too.  E.g. just to save it in case there are mailings floating
around which refer to old commit IDs.


In any case, thanks for the answers.  I guess I can live with copying
the git-filter-branch script when needed, it's not as if I run that
every day.

-- 
Hallvard
--
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]