Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-17 Thread Junio C Hamano
Junio C Hamano writes: > Lars Schneider writes: > ... >> Following your explanation this patch looks good to me and this fixes the >> test failure. TBH I never thought about the difference of these commands >> before. "rev" and "ref" sound so similar

Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-17 Thread Junio C Hamano
Lars Schneider writes: >> git-p4.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/git-p4.py b/git-p4.py >> index eab319d76e..351d1ab58e 100755 >> --- a/git-p4.py >> +++ b/git-p4.py >> @@ -582,7 +582,7 @@ def currentGitBranch(): >> #

Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-17 Thread Lars Schneider
> On 17 Mar 2017, at 13:56, Junio C Hamano wrote: > > Junio C Hamano writes: > >> Lars Schneider writes: >> >>> A quick bisect indicates that this patch might break >>> t9807-git-p4-submit.sh 8 and 13. I haven't looked into

Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-17 Thread Junio C Hamano
Michael J Gruber writes: >> +#define COMPARE(attribute, smaller_is_better)\ >> +if (name->attribute > attribute) \ >> +return smaller_is_better; \ >> +if (name->attribute < attribute) \ >> +return !smaller_is_better > > I find

Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-17 Thread Michael J Gruber
> hops, without taking the "taggerdate" into account. As we are > taking over the "taggerdate" field to store the committer date for > tips with commits: > > (1) keep the original logic when comparing names based on two refs > both of which are from refs/tags/; > > (2) favoring a name

Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-16 Thread Junio C Hamano
Junio C Hamano writes: > Lars Schneider writes: > >> A quick bisect indicates that this patch might break >> t9807-git-p4-submit.sh 8 and 13. I haven't looked into >> it further, yet. > > As I do not do P4, help in diagnosing why it breaks is

Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-16 Thread Junio C Hamano
Lars Schneider writes: > A quick bisect indicates that this patch might break > t9807-git-p4-submit.sh 8 and 13. I haven't looked into > it further, yet. As I do not do P4, help in diagnosing why it breaks is appreciated. If the test script expects a commit, that can

Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-16 Thread Lars Schneider
> On 16 Mar 2017, at 06:50, Junio C Hamano wrote: > > "git name-rev" assigned a phony "far in the future" date to tips of > refs that are not pointing at tag objects, and favored names based > on a ref with the oldest date. This made it almost impossible for > an unannotated

[PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-15 Thread Junio C Hamano
"git name-rev" assigned a phony "far in the future" date to tips of refs that are not pointing at tag objects, and favored names based on a ref with the oldest date. This made it almost impossible for an unannotated tags and branches to be counted as a viable base, which was especially