<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-filter-branch.sh, branch v2.26.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-09-05T20:01:48Z</updated>
<entry>
<title>Recommend git-filter-repo instead of git-filter-branch</title>
<updated>2019-09-05T20:01:48Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-09-04T22:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9df53c5de6e687df9cd7b36e633360178b65a0ef'/>
<id>urn:sha1:9df53c5de6e687df9cd7b36e633360178b65a0ef</id>
<content type='text'>
filter-branch suffers from a deluge of disguised dangers that disfigure
history rewrites (i.e. deviate from the deliberate changes).  Many of
these problems are unobtrusive and can easily go undiscovered until the
new repository is in use.  This can result in problems ranging from an
even messier history than what led folks to filter-branch in the first
place, to data loss or corruption.  These issues cannot be backward
compatibly fixed, so add a warning to both filter-branch and its manpage
recommending that another tool (such as filter-repo) be used instead.

Also, update other manpages that referenced filter-branch.  Several of
these needed updates even if we could continue recommending
filter-branch, either due to implying that something was unique to
filter-branch when it applied more generally to all history rewriting
tools (e.g. BFG, reposurgeon, fast-import, filter-repo), or because
something about filter-branch was used as an example despite other more
commonly known examples now existing.  Reword these sections to fix
these issues and to avoid recommending filter-branch.

Finally, remove the section explaining BFG Repo Cleaner as an
alternative to filter-branch.  I feel somewhat bad about this,
especially since I feel like I learned so much from BFG that I put to
good use in filter-repo (which is much more than I can say for
filter-branch), but keeping that section presented a few problems:
  * In order to recommend that people quit using filter-branch, we need
    to provide them a recomendation for something else to use that
    can handle all the same types of rewrites.  To my knowledge,
    filter-repo is the only such tool.  So it needs to be mentioned.
  * I don't want to give conflicting recommendations to users
  * If we recommend two tools, we shouldn't expect users to learn both
    and pick which one to use; we should explain which problems one
    can solve that the other can't or when one is much faster than
    the other.
  * BFG and filter-repo have similar performance
  * All filtering types that BFG can do, filter-repo can also do.  In
    fact, filter-repo comes with a reimplementation of BFG named
    bfg-ish which provides the same user-interface as BFG but with
    several bugfixes and new features that are hard to implement in
    BFG due to its technical underpinnings.
While I could still mention both tools, it seems like I would need to
provide some kind of comparison and I would ultimately just say that
filter-repo can do everything BFG can, so ultimately it seems that it
is just better to remove that section altogether.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mb/filter-branch-optim'</title>
<updated>2018-07-18T19:20:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-07-18T19:20:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=676c7e50b10f1fbb2ce06e46260f15f3a20679f7'/>
<id>urn:sha1:676c7e50b10f1fbb2ce06e46260f15f3a20679f7</id>
<content type='text'>
"git filter-branch" when used with the "--state-branch" option
still attempted to rewrite the commits whose filtered result is
known from the previous attempt (which is recorded on the state
branch); the command has been corrected not to waste cycles doing
so.

* mb/filter-branch-optim:
  filter-branch: skip commits present on --state-branch
</content>
</entry>
<entry>
<title>filter-branch: skip commits present on --state-branch</title>
<updated>2018-06-26T22:44:53Z</updated>
<author>
<name>Michael Barabanov</name>
<email>michael.barabanov@gmail.com</email>
</author>
<published>2018-06-26T04:07:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=709cfe848ad2312f80e6f4f7a27aa5d23992a0e3'/>
<id>urn:sha1:709cfe848ad2312f80e6f4f7a27aa5d23992a0e3</id>
<content type='text'>
The commits in state:filter.map have already been processed, so don't
filter them again. This makes incremental git filter-branch much faster.

Also add tests for --state-branch option.

Signed-off-by: Michael Barabanov &lt;michael.barabanov@gmail.com&gt;
Acked-by: Ian Campbell &lt;ijc@hellion.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Update shell scripts to compute empty tree object ID</title>
<updated>2018-05-02T04:59:53Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2018-05-02T00:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=03a7f388dafaee0aa084144efe7a8f9c151e5221'/>
<id>urn:sha1:03a7f388dafaee0aa084144efe7a8f9c151e5221</id>
<content type='text'>
Several of our shell scripts hard-code the object ID of the empty tree.
To avoid any problems when changing hashes, compute this value on
startup of the script.  For performance, store the value in a variable
and reuse it throughout the life of the script.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'yk/filter-branch-non-committish-refs'</title>
<updated>2018-04-10T07:28:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-04-10T07:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9aa3a4c406e1db08269cc8f6e8757555bd771120'/>
<id>urn:sha1:9aa3a4c406e1db08269cc8f6e8757555bd771120</id>
<content type='text'>
when refs that do not point at committish are given, "git
filter-branch" gave a misleading error messages.  This has been
corrected.

* yk/filter-branch-non-committish-refs:
  filter-branch: fix errors caused by refs that point at non-committish
</content>
</entry>
<entry>
<title>Merge branch 'ml/filter-branch-no-op-error'</title>
<updated>2018-04-09T23:25:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-04-09T23:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cb3e97dae806d66ea1859c48b9936d5bfbac9c09'/>
<id>urn:sha1:cb3e97dae806d66ea1859c48b9936d5bfbac9c09</id>
<content type='text'>
"git filter-branch" learned to use a different exit code to allow
the callers to tell the case where there was no new commits to
rewrite from other error cases.

* ml/filter-branch-no-op-error:
  filter-branch: return 2 when nothing to rewrite
</content>
</entry>
<entry>
<title>filter-branch: fix errors caused by refs that point at non-committish</title>
<updated>2018-03-25T17:12:27Z</updated>
<author>
<name>Yuki Kokubun</name>
<email>orga.chem.job@gmail.com</email>
</author>
<published>2018-03-25T16:54:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f78ab355e7d91c70faf41ddad9577cffc3b4ee60'/>
<id>urn:sha1:f78ab355e7d91c70faf41ddad9577cffc3b4ee60</id>
<content type='text'>
"git filter-branch -- --all" prints error messages when processing refs that
point at objects that are not committish. Such refs can be created by
"git replace" with trees or blobs. And also "git tag" with trees or blobs can
create such refs.

Filter these problematic refs out early, before they are seen by the logic to
see which refs have been modified and which have been left intact (which is
where the unwanted error messages come from), and warn that these refs are left
unwritten while doing so.

Signed-off-by: Yuki Kokubun &lt;orga.chem.job@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>filter-branch: use printf instead of echo -e</title>
<updated>2018-03-19T17:59:28Z</updated>
<author>
<name>Michele Locati</name>
<email>michele@locati.it</email>
</author>
<published>2018-03-19T15:52:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=206a6ae01355e4d5d0e01e6d99d960fcc907e6b3'/>
<id>urn:sha1:206a6ae01355e4d5d0e01e6d99d960fcc907e6b3</id>
<content type='text'>
In order to echo a tab character, it's better to use printf instead of
"echo -e", because it's more portable (for instance, "echo -e" doesn't work
as expected on a Mac).

This solves the "fatal: Not a valid object name" error in git-filter-branch
when using the --state-branch option.

Furthermore, let's switch from "/bin/echo" to just "echo", so that the
built-in echo command is used where available.

Signed-off-by: Michele Locati &lt;michele@locati.it&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>filter-branch: return 2 when nothing to rewrite</title>
<updated>2018-03-15T17:41:51Z</updated>
<author>
<name>Michele Locati</name>
<email>michele@locati.it</email>
</author>
<published>2018-03-15T17:09:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a0eb2e585788567094248652fc20450a0db642b'/>
<id>urn:sha1:0a0eb2e585788567094248652fc20450a0db642b</id>
<content type='text'>
Using the --state-branch option allows us to perform incremental filtering.
This may lead to having nothing to rewrite in subsequent filtering, so we need
a way to recognize this case.
So, let's exit with 2 instead of 1 when this "error" occurs.

Signed-off-by: Michele Locati &lt;michele@locati.it&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dg/filter-branch-filter-order-doc'</title>
<updated>2017-10-19T05:45:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-10-19T05:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e336afdfb67384aa058eeb47687545f0492ed40c'/>
<id>urn:sha1:e336afdfb67384aa058eeb47687545f0492ed40c</id>
<content type='text'>
Update the documentation for "git filter-branch" so that the filter
options are listed in the same order as they are applied, as
described in an earlier part of the doc.

* dg/filter-branch-filter-order-doc:
  doc: list filter-branch subdirectory-filter first
</content>
</entry>
</feed>
