Support comparison without specifying target (…/compare/<tag>..) #12546

Open
opened 2025-11-02 10:13:35 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @delvh on GitHub (Feb 26, 2024).

Feature Description

According to my local git, a command such as git diff <tag>.. is valid and implicitly the same as git diff <tag>..<HEAD>, same for the other way around.
I think this would also be a nice feature to have in our comparison page.
However, since we probably don't set HEAD (explicitly), I propose treating the missing <HEAD> as the head of the default branch, so when you omit one of the two arguments, you automatically compare against the default branch.

Screenshots

No response

Originally created by @delvh on GitHub (Feb 26, 2024). ### Feature Description According to my local git, a command such as `git diff <tag>..` is valid and implicitly the same as `git diff <tag>..<HEAD>`, same for the other way around. I think this would also be a nice feature to have in our comparison page. However, since we probably don't set `HEAD` (explicitly), I propose treating the missing `<HEAD>` as the head of the default branch, so when you omit one of the two arguments, you automatically compare against the default branch. ### Screenshots _No response_
GiteaMirror added the topic/repotype/proposal labels 2025-11-02 10:13:35 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12546