# [PATCH] filter-branch: Remove broken and unnecessary summary of rewritten refs.

3 messages from 2007-12-18 to 2007-12-18. Participants: Johannes Sixt, Junio C Hamano.
Thread: https://gitlist.dev/t/11337

## Johannes Sixt, 2007-12-18 07:30

Subject: [PATCH] filter-branch: Remove broken and unnecessary summary of rewritten refs.
Message-ID: <1197963047-15930-1-git-send-email-johannes.sixt@telecom.at>
URL: https://gitlist.dev/e/1197963047-15930-1-git-send-email-johannes.sixt%40telecom.at

```
There was an attempt to list the refs that were rewritten by filtering
the output of 'git show-ref' for 'refs/original'. But it got the
grep argument wrong, which did not account for the SHA1 that is listed
before the ref.

Moreover, right before this summary is the loop that actually does the
rewriting, and the rewritten refs are listed there anyway. So this extra
summary is plainly too verbose.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 git-filter-branch.sh |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 29d35fd..e730897 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -423,9 +423,6 @@ fi
 
 cd ../..
 rm -rf "$tempdir"
-echo
-test $count -gt 0 && echo "These refs were rewritten:"
-git show-ref | grep ^"$orig_namespace"
 
 unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE
 test -z "$ORIG_GIT_DIR" || GIT_DIR="$ORIG_GIT_DIR" && export GIT_DIR
-- 
1.5.4.rc0.73.gcaffa

```

## Junio C Hamano, 2007-12-18 09:56

Subject: Re: [PATCH] filter-branch: Remove broken and unnecessary summary of rewritten refs.
Message-ID: <7vejdk1g3h.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vejdk1g3h.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1197963047-15930-1-git-send-email-johannes.sixt@telecom.at>

```
Sounds sensible.  Applied.

```

## Johannes Sixt, 2007-12-18 11:21

Subject: Re: [PATCH] filter-branch: Remove broken and unnecessary summary of rewritten refs.
Message-ID: <4767AD2E.4040906@viscovery.net>
URL: https://gitlist.dev/e/4767AD2E.4040906%40viscovery.net
In-Reply-To: <7vejdk1g3h.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano schrieb:
> Sounds sensible.  Applied.

It seems lately I can't get a thing right on the first try. Would you please
squash this in as long as you haven't pushed out the commit? $count is
now unused.

Thank you!

--- >8 ---

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index e730897..f8bdc14 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -342,7 +342,6 @@ done < "$tempdir"/heads

 _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
 _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
-count=0
 echo
 while read ref
 do
@@ -380,7 +379,6 @@ do
 	;;
 	esac
 	git update-ref -m "filter-branch: backup" "$orig_namespace$ref" $sha1
-	count=$(($count+1))
 done < "$tempdir"/heads

 # TODO: This should possibly go, with the semantics that all positive given

```
