Git development
 help / color / mirror / Atom feed
From: "Avery Pennarun" <apenwarr@gmail.com>
To: "Jeff King" <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3 v2] Add --blob-filter option to filter-branch.
Date: Wed, 23 Apr 2008 18:07:03 -0400	[thread overview]
Message-ID: <32541b130804231507l4aff2ca3x962bf385a409685b@mail.gmail.com> (raw)
In-Reply-To: <20080423215501.GB30057@sigill.intra.peff.net>

On 4/23/08, Jeff King <peff@peff.net> wrote:
> On Wed, Apr 23, 2008 at 04:18:10PM -0400, Avery Pennarun wrote:
>
>  > From: Jeff King <peff@peff.net>
>  >
>  > 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

  reply	other threads:[~2008-04-23 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 19:42 [PATCH 1/3] Add --blob-filter option to filter-branch Avery Pennarun
2008-04-23 19:42 ` [PATCH 2/3] Make filter-branch --glob-filter much faster by not calling 'cat' Avery Pennarun
2008-04-23 19:42   ` [PATCH 3/3] Update documentation to describe git filter-branch --blob-filter Avery Pennarun
2008-04-23 20:05 ` [PATCH 1/3] Add --blob-filter option to filter-branch Johannes Schindelin
2008-04-23 20:12   ` Avery Pennarun
2008-04-23 20:14     ` Johannes Schindelin
2008-04-23 20:18       ` [PATCH 1/3 v2] " Avery Pennarun
2008-04-23 20:22         ` Johannes Schindelin
2008-04-23 21:55         ` Jeff King
2008-04-23 22:07           ` Avery Pennarun [this message]
2008-04-24  1:33             ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32541b130804231507l4aff2ca3x962bf385a409685b@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox