question re tags

2013-03-08 Thread John Stean
Ive been tagging some commits using tortoise git , for example with v1.0, 
v1.1 etc. In tortoise git log the tag sits alongside the commit as I expect.
But when I do a git describe it outputs the first tag along with the latest 
commit. What am I doing wrong?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: question re tags

2013-03-08 Thread Carlos Martín Nieto
On Fri, 2013-03-08 at 15:16 +, John Stean wrote:
 Ive been tagging some commits using tortoise git , for example with
 v1.0, v1.1 etc. In tortoise git log the tag sits alongside the
 commit as I expect.
 But when I do a git describe it outputs the first tag along with the
 latest commit. What am I doing wrong?

Those tags are probably lightweight tags, so by default git-describe
doesn't take them into account. You can pass the --tags flag to tell it
to consider lightweight tags as well.


   cmn


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Tags

2005-07-06 Thread Matthias Urlichs
Hi, Junio C Hamano wrote:

 I wanted to have something like this in the past for some reason
 I do not exactly remember anymore, but basically it was to
 record here is the list of related objects.

One use I'd have for that is regression testing -- collect all IDs in one
bag and then say gitk bad ^good.

OTOH, I dunno whether the core tools really need to understand that.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  [EMAIL PROTECTED]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
If at first you don't succeed, you must be a programmer.


-
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Tags

2005-07-06 Thread Eric W. Biederman
Linus Torvalds [EMAIL PROTECTED] writes:

 On Tue, 5 Jul 2005, Eric W. Biederman wrote:
 
 True but if you can you will get multiple tags with the
 same suggested name.  So you need so way to find the one you
 care about.

 I do agree that it would make sense to have a tagger field with the same 
 semantics as the committer in a commit (including all the same fields: 
 real name, email, and date).

Ok here is a patch that implements it.

I don't know how robust my code to get the defaults of tagger
email address and especially tagger name are but basically it
works.

In addition I added a message when git-tag-script is waiting
for you to type the tag message so people aren't confused.

And of course I modified git-mktag to check that the tagger
field is present.

Now git-pull-script just needs to be tweaked to optionally
add tags in the update into .git/refs/tags :)   Using git-fsck-cache
to find tags is doable but it slows down as your archive grows.

Eric


diff --git a/date.c b/date.c
diff --git a/git-tag-script b/git-tag-script
--- a/git-tag-script
+++ b/git-tag-script
@@ -1,12 +1,30 @@
 #!/bin/sh
 # Copyright (c) 2005 Linus Torvalds
 
+usage() {
+   echo 'git tag tag name [sha1]'
+   exit 1
+}
+
 : ${GIT_DIR=.git}
+if [ ! -d $GIT_DIR ]; then
+   echo Not a git directory 12
+   exit 1
+fi
+
+if [ $# -gt 2 -o $# -lt 1 ]; then
+   usage
+fi
 
 object=${2:-$(cat $GIT_DIR/HEAD)}
 type=$(git-cat-file -t $object) || exit 1
-( echo -e object $object\ntype $type\ntag $1\n; cat )  .tmp-tag
+tagger_name=${GIT_COMMITTER_NAME:-$(sed -n -e 
s/^$(whoami):[^:]*:[^:]*:[^:]*:\([^:,]*\).*:.*$/\1/p   /etc/passwd)}
+tagger_email=${GIT_COMMITTER_EMAIL:-$(whoami)@$(hostname --fqdn)}
+tagger_date=$(date -d ${GIT_COMMITTER_DATE:-$(date -R)} +%s %z) || exit 1
+echo Enter tag message now. ^D when finished
+( echo -e object $object\ntype $type\ntag $1\ntagger $tagger_name 
$tagger_email $tagger_date\n; cat)  .tmp-tag
 rm -f .tmp-tag.asc
 gpg -bsa .tmp-tag  cat .tmp-tag.asc  .tmp-tag
-git-mktag  .tmp-tag
-#rm .tmp-tag .tmp-tag.sig
+exit 1
+./git-mktag  .tmp-tag
+rm -f .tmp-tag .tmp-tag.sig
diff --git a/mktag.c b/mktag.c
--- a/mktag.c
+++ b/mktag.c
@@ -42,7 +42,7 @@ static int verify_tag(char *buffer, unsi
int typelen;
char type[20];
unsigned char sha1[20];
-   const char *object, *type_line, *tag_line;
+   const char *object, *type_line, *tag_line, *tagger_line;
 
if (size  64 || size  MAXSIZE-1)
return -1;
@@ -91,6 +91,11 @@ static int verify_tag(char *buffer, unsi
continue;
return -1;
}
+   /* Verify the tagger line */
+   tagger_line = tag_line;
+
+   if (memcmp(tagger_line, tagger , 7) || (tagger_line[7] == '\n'))
+   return -1;
 
/* The actual stuff afterwards we don't care about.. */
return 0;
@@ -119,7 +124,7 @@ int main(int argc, char **argv)
size += ret;
}
 
-   // Verify it for some basic sanity: it needs to start with object 
sha1\ntype 
+   // Verify it for some basic sanity: it needs to start with object 
sha1\ntype\ntagger 
if (verify_tag(buffer, size)  0)
die(invalid tag signature file);
 
-
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Tags

2005-07-05 Thread Eric W. Biederman
Linus Torvalds [EMAIL PROTECTED] writes:

 (And you might also change tag contents occasionally. One reason might be
 a bug and you decide to re-tag something else. But a more common reason
 might be because you want to have tags like latest that don't actually
 update with development, but they update with some other event, like a
 release event or some automated test cycle completion or something like
 that. So tags aren't _immutable_ even from an expectation standpoint, 
 it's just that they tend to change _less_).

Could you include the person who generated the tag and the time the
tag was generated in the tag object?

For a tag like latest it would help quite a bit if you could actually
find out which was the latest version of it :)

Eric
-
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html