Re: [PATCH] Add "--branches", "--tags" and "--remotes" options to git-rev-parse.
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 14, 2006, 23:24 UTC
- Message-ID
- <7v8xp4196e.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <BAYC1-PASMTP043948149786B7EE06DED3AEA20@CEZ.ICE>
Sean <seanlkml@sympatico.ca> writes:
Show 5 quoted lines
> On a related note, would it be okay to change "git tag -l" to > produce a list of tags without the "tags/" prefix in front of > every tag as it does now? Wanted to use the new "git > rev-parse --tags" instead of "find" to produce the list but am > not sure how important backward compatibility is in that case.
I do not have problem with that, but somebody else's script might; Cogito seems not to mind.
Something like this perhaps?
-- >8 --
diff --git a/git-tag.sh b/git-tag.sh index dc6aa95..2286ad5 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -28,11 +28,10 @@ do cd "$GIT_DIR/refs" && case "$#" in 1) - find tags -type f -print ;; - *) - shift - find tags -type f -print | grep "$@" ;; + set x . ;; esac + shift + find tags -type f -print | sed -e 's|^tags/||' | grep "$@" exit $? ;; -m)