diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-02-23 01:55:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-23 01:55:44 +0300 |
commit | 5fc6d00b65c0a946cccef3e3ed056830c8ea23fd (patch) | |
tree | 1ee617cc375c02703834f53803460a3579fe379e /builtin | |
parent | d9d677b2d8cc5f70499db04e633ba7a400f64cbf (diff) | |
parent | b2182a8730a2ad0a214f9118b5bd5d1f39c89544 (diff) |
Merge branch 'en/name-rev-make-taggerdate-much-less-important'
"git name-rev" heuristics update.
* en/name-rev-make-taggerdate-much-less-important:
name-rev: fix names by dropping taggerdate workaround
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/name-rev.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 15535e914a..0ebf06fad5 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -108,19 +108,11 @@ static int is_better_name(struct rev_name *name, int name_distance = effective_distance(name->distance, name->generation); int new_distance = effective_distance(distance, generation); - /* - * When comparing names based on tags, prefer names - * based on the older tag, even if it is farther away. - */ + /* If both are tags, we prefer the nearer one. */ if (from_tag && name->from_tag) - return (name->taggerdate > taggerdate || - (name->taggerdate == taggerdate && - name_distance > new_distance)); + return name_distance > new_distance; - /* - * We know that at least one of them is a non-tag at this point. - * favor a tag over a non-tag. - */ + /* Favor a tag over a non-tag. */ if (name->from_tag != from_tag) return from_tag; |