~sircmpwn/git.sr.ht#307: 
git: web interface doesn't show latest version number with reordered commits

I recently pushed some reordered commits and a version change to a test repo, and noticed that the version number did not update on the main repo page. I found that the repo did accept the version change, but the main repo page did not update.

I pushed 3 commits to the test repo: an initial commit, and 2 commits, x and y, reversed through rebase (shows up as y -> x -> initial in the tree). I tagged the 2 reversed commits, x = v1 and y = v2. Even though y shows up later in the tree, v1 is the featured reference.

Status
RESOLVED INVALID
Submitter
~bonbon
Assigned to
No-one
Submitted
2 months ago
Updated
a month ago
Labels
No labels applied.

~nabijaczleweli a month ago

That's because the tags are sorted by the object's time, but your tags are lightweight, and, as The Git Book explains, don't exist:

shirt:~/reftest# git show v2
commit 7931451dd539b8729ec52b081652ad24049e1764 (HEAD -> master, tag: v2, origin/master, origin/HEAD)
Author: bonbon <bonbon@bonbon.moe>
Date:   Wed Jul 29 23:25:08 2020 -0500

    add 1 set of lines

diff --git a/file b/file
index bf0db01..f5526dd 100644
--- a/file
+++ b/file
@@ -1,6 +1,10 @@
 This
 file
 contains
+a
+good
+chunk
+of
 lines

And the v1 commit is newer:

shirt:~/reftest# git log
commit 7931451dd539b8729ec52b081652ad24049e1764 (HEAD -> master, tag: v2, origin/master, origin/HEAD)
Author: bonbon <bonbon@bonbon.moe>
Date:   Wed Jul 29 23:25:08 2020 -0500

    add 1 set of lines

commit f86a474781698a81cd1c9e8868ab8b14dbc7d182 (tag: v1)
Author: bonbon <bonbon@bonbon.moe>
Date:   Wed Jul 29 23:26:21 2020 -0500

    add a second set of lines

commit 2698f731815e44837b5b1daf59960eec3a06935e
Author: bonbon <bonbon@bonbon.moe>
Date:   Wed Jul 29 23:23:10 2020 -0500

    inital commit

So this is the correct behaviour.

For testing purposes, I made an annotated tag of the root commit:

shirt:~/reftest# git tag -m :\) v0 v1^
shirt:~/reftest# git show v0
tag v0
Tagger: root <root@shirt.my.domain>
Date:   Tue Aug 4 16:17:05 2020 +0200

:)

commit 2698f731815e44837b5b1daf59960eec3a06935e (tag: v0)
Author: bonbon <bonbon@bonbon.moe>
Date:   Wed Jul 29 23:23:10 2020 -0500

    inital commit

diff --git a/file b/file
new file mode 100644
index 0000000..849004f
--- /dev/null
+++ b/file
@@ -0,0 +1,4 @@
+This
+file
+contains
+lines

And it shows up as the featured tag on the summary page.

~sircmpwn REPORTED INVALID a month ago

Hm, I thought I already explained something similar and closed this ticket. Apparently not. Thanks ~nabijaczleweli!

~bonbon a month ago

Ahhh, thanks for the feedback and the resources! I'm still learning my way around with using git in an open-source setting, and I didn't know about annotated tags. Thanks for the help :)

Register here or Log in to comment, or comment via email.