# [PATCH] Minor clarifications to git-filter-branch usage and doc

4 messages from 2007-08-17 to 2007-08-17. Participants: Brian Gernhardt, Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/9565

## Brian Gernhardt, 2007-08-17 21:23

Subject: [PATCH] Minor clarifications to git-filter-branch usage and doc
Message-ID: <20070817212359.GA14197@Hermes.local>
URL: https://gitlist.dev/e/20070817212359.GA14197%40Hermes.local

```
- Remove "DESTBRANCH" from usage, as it rewrites the branches given
- Remove an = from an example usage that the script doesn't understand

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
---

 It took me way too long to figure out how to just delete a single file
 from the history.

 From the docs and usage it looked I needed
 $ git filter-branch --index-filter \
 	 "git update-index --force-remove file" \
 	 --tag-name-filter=cat newbranch HEAD

 I eventually determined the following
 $ git filter-branch --index-filter \
 	 "git update-index --force-remove file" \
 	 --tag-name-filter cat master

 The following changes changes the parts that led me astray, although I
 think it still could be clearer even if I don't know how to write it.

 Documentation/git-filter-branch.txt |    2 +-
 git-filter-branch.sh                |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 915258f..8c43be6 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -120,7 +120,7 @@ have all of them as parents.
 	tag name is expected on standard output.
 +
 The original tags are not deleted, but can be overwritten;
-use "--tag-name-filter=cat" to simply update the tags.  In this
+use "--tag-name-filter cat" to simply update the tags.  In this
 case, be very careful and make sure you have the old tags
 backed up in case the conversion has run afoul.
 +
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index c42e451..9f10c30 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -8,7 +8,7 @@
 # a new branch. You can specify a number of filters to modify the commits,
 # files and trees.
 
-USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] DESTBRANCH [REV-RANGE]"
+USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] [BRANCHES]"
 . git-sh-setup
 
 warn () {
-- 
1.5.3.rc5.11.g312e

```

## Johannes Schindelin, 2007-08-17 21:53

Subject: Re: [PATCH] Minor clarifications to git-filter-branch usage and doc
Message-ID: <Pine.LNX.4.64.0708172252440.20400@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0708172252440.20400%40racer.site
In-Reply-To: <20070817212359.GA14197@Hermes.local>

```
Hi,

On Fri, 17 Aug 2007, Brian Gernhardt wrote:

> -USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] DESTBRANCH [REV-RANGE]"
> +USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] [BRANCHES]"

It is not just [BRANCHES].  Something like "HEAD~2..HEAD" is perfectly 
valid, and it will rewrite only the commits in that range, leaving HEAD~2 
and ancestors alone.

Ciao,
Dscho

```

## Brian Gernhardt, 2007-08-17 23:13

Subject: [PATCH v2] Minor clarifications to git-filter-branch usage and doc
Message-ID: <20070817231304.GA14501@Hermes.local>
URL: https://gitlist.dev/e/20070817231304.GA14501%40Hermes.local
In-Reply-To: <Pine.LNX.4.64.0708172252440.20400@racer.site>

```
- Remove "DESTBRANCH" from usage, as it rewrites the branches given.
- Remove an = from an example usage, as the script doesn't understand
it.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
---

 On Aug 17, 2007, at 5:53 PM, Johannes Schindelin wrote:

 > On Fri, 17 Aug 2007, Brian Gernhardt wrote:
 >  
 >> -USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] DESTBRANCH [REV-RANGE]"
 >> +USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] [BRANCHES]"
 > 
 > It is not just [BRANCHES].  Something like "HEAD~2..HEAD" is perfectly 
 > valid, and it will rewrite only the commits in that range, leaving HEAD~2 
 > and ancestors alone.

 Well then that should be left as REV-RANGE then, but DESTBRANCH still
 needs to leave.

 Documentation/git-filter-branch.txt |    2 +-
 git-filter-branch.sh                |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 915258f..8c43be6 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -120,7 +120,7 @@ have all of them as parents.
 	tag name is expected on standard output.
 +
 The original tags are not deleted, but can be overwritten;
-use "--tag-name-filter=cat" to simply update the tags.  In this
+use "--tag-name-filter cat" to simply update the tags.  In this
 case, be very careful and make sure you have the old tags
 backed up in case the conversion has run afoul.
 +
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index c42e451..0190060 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -8,7 +8,7 @@
 # a new branch. You can specify a number of filters to modify the commits,
 # files and trees.
 
-USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] DESTBRANCH [REV-RANGE]"
+USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] [REV-RANGE]"
 . git-sh-setup
 
 warn () {
-- 
1.5.3.rc5.11.g312e

```

## Junio C Hamano, 2007-08-17 23:33

Subject: Re: [PATCH v2] Minor clarifications to git-filter-branch usage and doc
Message-ID: <7vbqd5g2il.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vbqd5g2il.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20070817231304.GA14501@Hermes.local>

```
Thanks.

```
