Re: [PATCH] Add "--branches", "--tags" and "--remotes" options to git-rev-parse.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sean <seanlkml@xxxxxxxxxxxx> writes:

> 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)

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]