Instead of naming a rev after a tip that is topologically closest,
use the tip that is the oldest one among those which contain the
rev.
The semantics name-rev --weight would give is closer to what
people expect from describe --contains.
Note that this is fairly expensive (see NEEDSWORK comment
Junio C Hamano gits...@pobox.com writes:
Note that this is fairly expensive (see NEEDSWORK comment in the
code).
And this is with the notes-cache.
(priming the cache from scratch)
$ rm .git/refs/notes/name-rev-weight
$ /usr/bin/time ../git.git/git-name-rev --weight --tags
On Wed, Aug 29, 2012 at 04:37:06PM -0700, Junio C Hamano wrote:
Junio C Hamano gits...@pobox.com writes:
Note that this is fairly expensive (see NEEDSWORK comment in the
code).
And this is with the notes-cache.
[...]
+static int get_tip_weight(struct commit *commit)
+{
+ struct
Jeff King p...@peff.net writes:
OK. I didn't think too hard about it, so I'll trust you that it is not
easy. I wonder if using the generation number would be another way of
defining oldest that would be easier to calculate.
Go back to my illustration to Greg and think about the implication
of
Junio C Hamano gits...@pobox.com writes:
Jeff King p...@peff.net writes:
OK. I didn't think too hard about it, so I'll trust you that it is not
easy. I wonder if using the generation number would be another way of
defining oldest that would be easier to calculate.
Go back to my
5 matches
Mail list logo