Re: [PATCH v2] filter-branch: skip commits present on --state-branch

2018-06-26 Thread Ian Campbell
by: Michael Barabanov Acked-by: Ian Campbell > --- > git-filter-branch.sh | 1 + > t/t7003-filter-branch.sh | 15 +++ > 2 files changed, 16 insertions(+) > > diff --git a/git-filter-branch.sh b/git-filter-branch.sh > index ccceaf19a..5c5afa2b9 100755 >

Re: [PATCH] filter-branch: use printf instead of echo -e

2018-03-20 Thread Ian Campbell
On Tue, 2018-03-20 at 00:22 -0400, Jeff King wrote: > Author cc'd in case there's something more interesting going on. That code was written years ago, if I had a good reason at the time I've forgotten what it was and I can't think of a fresh one now. Switching to printf seems like a reasonable

Re: How to use filter-branch with --state-branch?

2018-03-09 Thread Ian Campbell
On Fri, 2018-03-09 at 14:04 +0100, Michele Locati wrote: > Just a couple of questions: > > 1. it seems to me it's not possible to process all the branches in one > go. Am I right? I'm not sure, I've never done such a thing, in fact I didn't know you could. Really all this feature does is record

Re: How to use filter-branch with --state-branch?

2018-03-08 Thread Ian Campbell
On Thu, 2018-03-08 at 10:25 +0100, Ævar Arnfjörð Bjarmason wrote: > > The first filter-branch call required 7168 steps, so did the second call... > > I also tried without the --prune option of remote update (I had to add > > --force to the second filter-branch), but nothing changed. You can see

Re: What's cooking in git.git (Sep 2017, #06; Fri, 29)

2017-09-29 Thread Ian Campbell
On Fri, 2017-09-29 at 13:34 +0900, Junio C Hamano wrote: > > * ic/fix-filter-branch-to-handle-tag-without-tagger (2017-09-22) 4 > commits > (merged to 'next' on 2017-09-25 at c7550033df) > + filter-branch: use hash-object instead of mktag > + filter-branch: stash away ref map in a branch > +

Re: [PATCH v3 0/4] filter-branch: support for incremental update + fix for ancient tag format

2017-09-22 Thread Ian Campbell
On Fri, 2017-09-22 at 13:42 +0900, Junio C Hamano wrote: > Ian Campbell <i...@hellion.org.uk> writes: > > > This is the third version of my patches to add incremental support to > > git-filter-branch. Since the last time I have replaced `git mktag -- > > allow-

[PATCH v3 3/4] filter-branch: stash away ref map in a branch

2017-09-21 Thread Ian Campbell
With "--state-branch=" option, the mapping from old object names and filtered ones in ./map/ directory is stashed away in the object database, and the one from the previous run is read to populate the ./map/ directory, allowing for incremental updates of large trees. Signed-off-by: Ia

[PATCH v3 1/4] filter-branch: reset $GIT_* before cleaning up

2017-09-21 Thread Ian Campbell
This is pure code motion to enable a subsequent patch to add code which needs to happen with the reset $GIT_* but before the temporary directory has been cleaned up. Signed-off-by: Ian Campbell <i...@hellion.org.uk> --- git-filter-branch.sh | 10 +- 1 file changed, 5 insertions

[PATCH v3 4/4] filter-branch: use hash-object instead of mktag

2017-09-21 Thread Ian Campbell
| git mktag error: char76: could not find "tagger " fatal: invalid tag signature file $ git cat-file tag v2.6.12-rc2 | git hash-object -t tag -w --stdin 9e734775f7c22d2f89943ad6c745571f1930105f Signed-off-by: Ian Campbell <i...@hellion.org.uk> --- git-filter-branch.s

[PATCH v3 2/4] filter-branch: preserve and restore $GIT_AUTHOR_* and $GIT_COMMITTER_*

2017-09-21 Thread Ian Campbell
These are modified by set_ident() but a subsequent patch would like to operate on their original values. Signed-off-by: Ian Campbell <i...@hellion.org.uk> --- git-filter-branch.sh | 33 + 1 file changed, 33 insertions(+) diff --git a/git-filter-branch.sh

[PATCH v3 0/4] filter-branch: support for incremental update + fix for ancient tag format

2017-09-21 Thread Ian Campbell
This is the third version of my patches to add incremental support to git-filter-branch. Since the last time I have replaced `git mktag -- allow-missing-tagger` with `git hash-object -t tag -w --stdin`. I've force pushed to [1] (Travis is still running) and have set off the process of

Re: [PATCH v2 1/4] mktag: add option which allows the tagger field to be omitted

2017-09-19 Thread Ian Campbell
On Tue, 2017-09-19 at 12:01 +0900, Junio C Hamano wrote: > > Hmph.  I cannot shake this nagging feeling that this is probably a > solution that is overly narrow to a single problem that won't scale > into the future. > > [...snip good point...] > > If we drop the "verification" step from the

Re: [PATCH v2 4/4] Subject: filter-branch: stash away ref map in a branch

2017-09-17 Thread Ian Campbell
On Sun, 2017-09-17 at 08:36 +0100, Ian Campbell wrote: > +if test -n "$state_branch" > +then > > + echo "Saving rewrite state to $state_branch" 1>&2 > > + state_blob=$( > > + perl -e'opendir D, "../map" or die; > > +

[PATCH v2 1/4] mktag: add option which allows the tagger field to be omitted

2017-09-17 Thread Ian Campbell
in `filter-branch`. Signed-off-by: Ian Campbell <i...@hellion.org.uk> --- Documentation/git-mktag.txt | 9 +++- builtin/mktag.c | 100 +--- git-filter-branch.sh| 2 +- t/t3800-mktag.sh| 33 ++- 4 f

[PATCH v2 3/4] filter-branch: preserve and restore $GIT_AUTHOR_* and $GIT_COMMITTER_*

2017-09-17 Thread Ian Campbell
These are modified by set_ident() but a subsequent patch would like to operate on their original values. Signed-off-by: Ian Campbell <i...@hellion.org.uk> --- git-filter-branch.sh | 33 + 1 file changed, 33 insertions(+) diff --git a/git-filter-branch.sh

[PATCH v2 2/4] filter-branch: reset $GIT_* before cleaning up

2017-09-17 Thread Ian Campbell
This is pure code motion to enable a subsequent patch to add code which needs to happen with the reset $GIT_* but before the temporary directory has been cleaned up. Signed-off-by: Ian Campbell <i...@hellion.org.uk> --- git-filter-branch.sh | 10 +- 1 file changed, 5 insertions

[PATCH v2 0/4] filter-branch: support for incremental update + fix for ancient tag format

2017-09-17 Thread Ian Campbell
This is the second version of my patches to add incremental support to git-filter-branch. Since the last time I have: * addressed the review feedback (see changelog embedded in final patch) * switched to using the (newly introduced) `--allow-missing-tagger` option to `git mktag` to allow

[PATCH v2 4/4] Subject: filter-branch: stash away ref map in a branch

2017-09-17 Thread Ian Campbell
With "--state-branch=" option, the mapping from old object names and filtered ones in ./map/ directory is stashed away in the object database, and the one from the previous run is read to populate the ./map/ directory, allowing for incremental updates of large trees. Signed-off-by: Ia

Re: [PATCH 2/2] filter-branch: Handle rewritting (very) old style tags which lack tagger

2017-08-09 Thread Ian Campbell
On Wed, 2017-08-09 at 08:50 -0700, Junio C Hamano wrote: > Jeff King <p...@peff.net> writes: > > > On Tue, Aug 08, 2017 at 09:06:20AM +0100, Ian Campbell wrote: > > > >> Such as v2.6.12-rc2..v2.6.13-rc3 in the Linux kernel source tree. > >>  > >&g

Re: [PATCH 1/2] filter-branch: Add --state-branch to hold pickled copy of ref map

2017-08-09 Thread Ian Campbell
On Tue, 2017-08-08 at 13:56 -0700, Junio C Hamano wrote: > Ian Campbell <i...@hellion.org.uk> writes: > > > Allowing for incremental updates of large trees. > > "by doing what" is missing.  And ... > > > > > I have been using this as pa

Re: [PATCH 2/2] filter-branch: Handle rewritting (very) old style tags which lack tagger

2017-08-09 Thread Ian Campbell
On Tue, 2017-08-08 at 14:00 -0700, Junio C Hamano wrote: > > @@ -540,6 +540,9 @@ if [ "$filter_tag_name" ]; then > > >   new_sha1=$( ( printf 'object %s\ntype commit\ntag %s\n' > > >\ > > >   "$new_sha1" "$new_ref" > > >  

[PATCH 0/2] filter-branch: support for incremental update + fix for ancient tag format

2017-08-08 Thread Ian Campbell
Hi, I've long (since 2013, urk!) been carrying these two changes to git- filter-branch in the split out devicetree source tree[0] which extracts all the device tree sources from the Linux kernel source tree. I think it's about time I sent them here, sorry for the rather extreme delay! I've

[PATCH 2/2] filter-branch: Handle rewritting (very) old style tags which lack tagger

2017-08-08 Thread Ian Campbell
not find "tagger " fatal: invalid tag signature file $ git cat-file tag v2.6.13-rc4 | git mktag 7eab951de91d95875ba34ec4c599f37e1208db93 Signed-off-by: Ian Campbell <i...@hellion.org.uk> --- git-filter-branch.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-filter

[PATCH 1/2] filter-branch: Add --state-branch to hold pickled copy of ref map

2017-08-08 Thread Ian Campbell
Allowing for incremental updates of large trees. I have been using this as part of the device tree extraction from the Linux kernel source since 2013, about time I sent the patch upstream! Signed-off-by: Ian Campbell <i...@hellion.org.uk> --- git-filter-branch.s