]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/name-rev-lw-tag' into maint
authorJunio C Hamano <gitster@pobox.com>
Sat, 24 Jun 2017 22:29:27 +0000 (15:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 24 Jun 2017 22:29:28 +0000 (15:29 -0700)
"git describe --contains" penalized light-weight tags so much that
they were almost never considered.  Instead, give them about the
same chance to be considered as an annotated tag that is the same
age as the underlying commit would.

* jc/name-rev-lw-tag:
  name-rev: favor describing with tags and use committer date to tiebreak
  name-rev: refactor logic to see if a new candidate is a better name

1  2 
builtin/name-rev.c
t/t4202-log.sh

index e7a3fe7ee70759c34b9de12177078a55f27bfb9a,bf7ed015aebc07d2dd410745786fec269c28091f..1767af750dde7f5184b4df25067f9f616c1918b3
@@@ -54,10 -91,9 +92,11 @@@ copy_data
                name->taggerdate = taggerdate;
                name->generation = generation;
                name->distance = distance;
 -      } else
+               name->from_tag = from_tag;
 +      } else {
 +              free(to_free);
                return;
 +      }
  
        for (parents = commit->parents;
                        parents;
diff --cc t/t4202-log.sh
Simple merge