Re: [PATCH] Add "--branches", "--tags" and "--remotes" options to git-rev-parse.
- From
Sean <seanlkml@sympatico.ca>
- Date
- May 15, 2006, 00:07 UTC
- Message-ID
- <BAYC1-PASMTP079744DE4B299C5B567F30AEA30@CEZ.ICE>
- In-Reply-To
- <7v8xp4196e.fsf@assigned-by-dhcp.cox.net>
On Sun, 14 May 2006 16:24:57 -0700 Junio C Hamano <junkio@cox.net> wrote:
> I do not have problem with that, but somebody else's script > might; Cogito seems not to mind. > > Something like this perhaps?
That looks good. If you accept the rev-parse patch, then i'd suggest the patch below instead.
Sean
diff --git a/git-tag.sh b/git-tag.sh index dc6aa95..a0afa25 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -25,14 +25,12 @@ do force=1 ;; -l) - cd "$GIT_DIR/refs" && case "$#" in 1) - find tags -type f -print ;; - *) - shift - find tags -type f -print | grep "$@" ;; + set x . ;; esac + shift + git rev-parse --symbolic --tags | sort | grep "$@" exit $? ;; -m)