From: Uwe Kleine-König Date: Mon, 27 Aug 2007 19:27:35 GMT Subject: Re: [PATCH] name-rev: Fix non-shortest description Message-ID: <20070827192735.GB20753@informatik.uni-freiburg.de> In-Reply-To: Johannes Schindelin wrote: > > Uwe Kleine-König noticed that under certain circumstances, name-rev > picked a non-optimal tag. Jeff King analyzed that name-rev only > takes into account the number of merge traversals, and then the > _last_ number in the description. > > As an easy way to fix it, use a weighting factor for merge traversals: > A merge traversal is now made 65535 times more expensive than a > first-parent traversal. > > Signed-off-by: Johannes Schindelin Just from looking at the patch it seems to do what the log says. It passes the test suite and fixed my use case. So: Acked-by: Uwe Kleine-König But if I'd really prefer to know the "oldest" tag that includes the given rev, I don't want that weighting. I will try to come up with a patch that introduces a flag. Best regards and thanks to Johannes Uwe -- Uwe Kleine-König primes where sieve (p:xs) = [ x | x<-xs, x `rem` p /= 0 ]; \ primes = map head (iterate sieve [2..])