Re: [PATCH 1/3 v2] Add --blob-filter option to filter-branch.

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

 



On 4/23/08, Jeff King <peff@xxxxxxxx> wrote:
> On Wed, Apr 23, 2008 at 04:18:10PM -0400, Avery Pennarun wrote:
>
>  > From: Jeff King <peff@xxxxxxxx>
>  >
>  > This patch allows
>  >
>  >   git filter-branch --blob-filter 'tr a-z A-Z'
>
> The commit message munging you did is fine.
>
>  However, I think Johannes Sixt's question about providing the pathname
>  needs to be resolved. As it is now, the blob-filter is impossible to use
>  in a mixed binary/text repository, short of the undocumented $path magic
>  that you described. And I am a little uncomfortable just adding the
>  $path as he suggested because of the subtle bug it introduces.

It is indeed a very subtle bug; so subtle, in fact, that I never
expect to experience it myself :)

I think it would be fine to index into the cache using $path$sha1,
which would seem to resolve this issue.  The catch is that $path isn't
a very good cachefile name.  I'd suggest doing an md5sum or something
on it, but that would result in an extra fork for every file, which
brings us back to our original level of slowness (or worse).

Hmm, I gues using a cachefile like $sha1/$path would work; it requires
a "mkdir -p", but only when *filling* the cache.

Avery
--
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