{"thread":{"id":"32238","subject":"git describe not matching git log","startedAt":"2012-11-29T09:04:14Z","lastAt":"2012-11-29T14:06:43Z","messageCount":2,"participants":["Steven Penny","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"204243","messageId":"CAAXzdLWNb7E1qincviX5y_uEsT71bbepuUtLR7Q_+Exm8Od6yw@mail.gmail.com","threadId":"32238","inReplyTo":null,"subject":"git describe not matching git log","fromName":"Steven Penny","fromEmail":"svnpenn@gmail.com","sentAt":"2012-11-29T09:04:14Z","receivedAt":"2012-11-29T09:04:14Z","isPatch":false,"sender":{"key":"svnpenn@gmail.com","avatar":"https://avatars.githubusercontent.com/u/60531334?v=4"},"body":"It seems \"git describe\" is not matching \"git log\" as detailed in the help, in\nsome cases. From git describe --help\n\n  [torvalds@g5 git]$ git describe parent\n  v1.0.4-14-g2414721\n\n  The number of additional commits is the number of commits which would\n  be displayed by \"git log v1.0.4..parent\".\n\nGOOD\n\n  $ git clone git://github.com/antirez/redis.git\n\n  $ cd redis\n\n  $ git describe unstable\n  with-deprecated-diskstore-1050-g7383c3b\n\n  $ git log --oneline with-deprecated-diskstore..unstable | wc\n     1050   11779   78709\n\nBAD\n\n  $ git clone git://github.com/git/git.git\n\n  $ cd git\n\n  $ git describe master\n  v1.8.0.1-264-g226dcb5\n\n  $ git log --oneline v1.8.0.1..master | wc\n      260    1650   14154\n"},{"id":"204254","messageId":"50B76BF3.1090104@drmicha.warpmail.net","threadId":"32238","inReplyTo":"CAAXzdLWNb7E1qincviX5y_uEsT71bbepuUtLR7Q_+Exm8Od6yw@mail.gmail.com","subject":"Re: git describe not matching git log","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-11-29T14:06:43Z","receivedAt":"2012-11-29T14:06:43Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Steven Penny venit, vidit, dixit 29.11.2012 10:04:\n> It seems \"git describe\" is not matching \"git log\" as detailed in the help, in\n> some cases. From git describe --help\n> \n>   [torvalds@g5 git]$ git describe parent\n>   v1.0.4-14-g2414721\n> \n>   The number of additional commits is the number of commits which would\n>   be displayed by \"git log v1.0.4..parent\".\n> \n> GOOD\n> \n>   $ git clone git://github.com/antirez/redis.git\n> \n>   $ cd redis\n> \n>   $ git describe unstable\n>   with-deprecated-diskstore-1050-g7383c3b\n> \n>   $ git log --oneline with-deprecated-diskstore..unstable | wc\n>      1050   11779   78709\n> \n> BAD\n> \n>   $ git clone git://github.com/git/git.git\n> \n>   $ cd git\n> \n>   $ git describe master\n>   v1.8.0.1-264-g226dcb5\n> \n>   $ git log --oneline v1.8.0.1..master | wc\n>       260    1650   14154\n> \n\nThis is due to date skew: git-describe uses \"insert_by_date\" when it\ntraverses the dag, and this can go wrong.\n\nInterestingling, this seems to get fixed by using Jeff's generation\nnumbers and \"insert_by_generation\" instead, so it does seem go wrong for\n226dcb5~60 or so. git-describe's logic is a bit convoluted and may\ndepend on how we insert when generation numbers are the same... Have to\ndo more testing.\n\nMichael\n"}]}