<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/git-filter-branch.sh, branch v1.8.0.2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2012-07-22T19:55:05Z</updated>
<entry>
<title>Merge branch 'jc/maint-filter-branch-epoch-date'</title>
<updated>2012-07-22T19:55:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-07-22T19:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9a0231b395cb9720365b7066312eeaa86e37ed31'/>
<id>urn:sha1:9a0231b395cb9720365b7066312eeaa86e37ed31</id>
<content type='text'>
In 1.7.9 era, we taught "git rebase" about the raw timestamp format
but we did not teach the same trick to "filter-branch", which rolled
a similar logic on its own.  Because of this, "filter-branch" failed
to rewrite commits with ancient timestamps.

* jc/maint-filter-branch-epoch-date:
  t7003: add test to filter a branch with a commit at epoch
  date.c: Fix off by one error in object-header date parsing
  filter-branch: do not forget the '@' prefix to force git-timestamp
</content>
</entry>
<entry>
<title>filter-branch: do not forget the '@' prefix to force git-timestamp</title>
<updated>2012-07-10T03:42:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-07-09T23:53:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=cb102b083252b575b18afa8d4b4a4b1bc1ffdf9e'/>
<id>urn:sha1:cb102b083252b575b18afa8d4b4a4b1bc1ffdf9e</id>
<content type='text'>
For some reason, this script reinvents, instead of refactoring the
existing one in git-sh-setup, the logic to grab ident information
from an existing commit; it was missed when the corresponding logic
in git-sh-setup was updated with 2c733fb (parse_date(): '@' prefix
forces git-timestamp, 2012-02-02).

Teach the script that it is OK to have a way ancient timestamp in
the commits that are being filtered.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/filter-branch-require-clean-work-tree'</title>
<updated>2011-10-05T19:35:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-05T19:35:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9c140016508fe7329d5aa962b473d8e84af108b1'/>
<id>urn:sha1:9c140016508fe7329d5aa962b473d8e84af108b1</id>
<content type='text'>
* jk/filter-branch-require-clean-work-tree:
  filter-branch: use require_clean_work_tree
</content>
</entry>
<entry>
<title>filter-branch: use require_clean_work_tree</title>
<updated>2011-09-15T23:58:55Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-09-01T21:53:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=5347a50fec066845e5dfa34a53cbec1ea347641d'/>
<id>urn:sha1:5347a50fec066845e5dfa34a53cbec1ea347641d</id>
<content type='text'>
Filter-branch already requires that we have a clean work
tree before starting. However, it failed to refresh the
index before checking, which means it could be wrong in the
case of stat-dirtiness.

Instead of simply adding a call to refresh the index, let's
switch to using the require_clean_work_tree function
provided by git-sh-setup. It does exactly what we want, and
with fewer lines of code and more specific output messages.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/sh-style'</title>
<updated>2011-08-18T00:35:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-18T00:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=146120588046e97e52367cad658b42accffa098e'/>
<id>urn:sha1:146120588046e97e52367cad658b42accffa098e</id>
<content type='text'>
* js/sh-style:
  filter-branch.sh: de-dent usage string
  misc-sh: fix up whitespace in some other .sh files.
</content>
</entry>
<entry>
<title>filter-branch: Export variable `workdir' for --commit-filter</title>
<updated>2011-08-08T19:09:38Z</updated>
<author>
<name>Michael Witten</name>
<email>mfwitten@gmail.com</email>
</author>
<published>2011-08-07T02:44:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0906f6e14e6e9df0c4ea4edb08ebe9f5d16c2391'/>
<id>urn:sha1:0906f6e14e6e9df0c4ea4edb08ebe9f5d16c2391</id>
<content type='text'>
According to `git help filter-branch':

       --commit-filter &lt;command&gt;
           ...
           You can use the _map_ convenience function in this filter,
           and other convenience functions, too...
           ...

However, it turns out that `map' hasn't been usable because it depends
on the variable `workdir', which is not propogated to the environment
of the shell that runs the commit-filter &lt;command&gt; because the
shell is created via a simple-command rather than a compound-command
subshell:

 @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \
                 $(git write-tree) $parentstr &lt; ../message &gt; ../map/$commit ||
                         die "could not write rewritten commit"

One solution is simply to export `workdir'. However, it seems rather
heavy-handed to export `workdir' to the environments of all commands,
so instead this commit exports `workdir' for only the duration of the
shell command in question:

 workdir=$workdir @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \
                 $(git write-tree) $parentstr &lt; ../message &gt; ../map/$commit ||
                         die "could not write rewritten commit"

Signed-off-by: Michael Witten &lt;mfwitten@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>filter-branch.sh: de-dent usage string</title>
<updated>2011-08-05T22:06:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-05T22:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9dcca58db42e85e056c6523429204f367a671a0e'/>
<id>urn:sha1:9dcca58db42e85e056c6523429204f367a671a0e</id>
<content type='text'>
"Usage: git filter-branch " that is prefixed to the first line is 25
columns long, so the "[--index-filter ..." on the second line would not
align with "[--env-filter ..." on the first line to begin with. If the
second and subsequent lines do not aim to align with anything on the
first line, it is just fine to indent them with a single HT.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>misc-sh: fix up whitespace in some other .sh files.</title>
<updated>2011-08-05T22:04:48Z</updated>
<author>
<name>Jon Seymour</name>
<email>jon.seymour@gmail.com</email>
</author>
<published>2011-08-05T13:31:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=285c6cbf3c8eeadb6d4d4c3203888809e1cc7a81'/>
<id>urn:sha1:285c6cbf3c8eeadb6d4d4c3203888809e1cc7a81</id>
<content type='text'>
I found that the patched 4 files were different when this
filter is applied.

	expand -i | unexpand --first-only

This patch contains the corrected files.

Signed-off-by: Jon Seymour &lt;jon.seymour@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>filter-branch: retire --remap-to-ancestor</title>
<updated>2010-08-27T23:47:01Z</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@gluster.com</email>
</author>
<published>2010-08-27T20:44:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7ec344d802970782036146e29ba2213e86d49fe1'/>
<id>urn:sha1:7ec344d802970782036146e29ba2213e86d49fe1</id>
<content type='text'>
We can be clever and know by ourselves when we need the behavior
implied by "--remap-to-ancestor". No need to encumber users by having
them exposed to it as a tunable. (Option kept for backward compatibility,
but it's now a no-op.)

Signed-off-by: Csaba Henk &lt;csaba@gluster.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2010-02-12T07:06:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-02-12T07:06:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=618d18b5aa9420fe446f7a1ed69d65fb45fa49b7'/>
<id>urn:sha1:618d18b5aa9420fe446f7a1ed69d65fb45fa49b7</id>
<content type='text'>
* maint:
  filter-branch: Fix error message for --prune-empty --commit-filter
</content>
</entry>
</feed>
