On Fri, Jul 11, 2008 at 5:39 PM, Toralf Förster <toralf.foerster@xxxxxx> wrote: > > Ok, following the thread I understand why this feature isn't wanted by all. But > for the given example (where I only pulled from another git tree) this could > work, isn't it : ? > > tfoerste@n22 ~/devel/linux-2.6 $ git-log v2.6.26-rc9.. | perl -e '@c = grep { /^commit/ } <>; print map { $#c - $i++ . "\t" . $_ } @c' No, it does not. Running your script, I have ... 56 commit 803a9067e19714ea7b7da760fe92f0d53bfa6994 ... Now, let's see what git-describe thinks about it $ git describe 803a9067e19714ea7b7da760fe92f0d53bfa6994 v2.6.26-rc9-38-g803a906 Your script is obviously incorrect. It is written in the assumption that history is linear, but it is not. Even if you pull only from one repo, this repo still contains *many* branches. Along any branch, you may have the same number. Dmitry -- To unsubscribe from this list: 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