~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
7 5

[PATCH git.sr.ht] show ref in title

Details
Message ID
<20231112115825.14822-2-gabriel@augendre.info>
DKIM signature
missing
Download raw message
Patch: +3 -3
Signed-off-by: Gabriel Augendre <gabriel@augendre.info>
---
 gitsrht/templates/blame.html | 2 +-
 gitsrht/templates/blob.html  | 2 +-
 gitsrht/templates/tree.html  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gitsrht/templates/blame.html b/gitsrht/templates/blame.html
index 2c09ea5..f6a4015 100644
--- a/gitsrht/templates/blame.html
+++ b/gitsrht/templates/blame.html
@@ -1,7 +1,7 @@
{% extends "repo-full.html" %}
{% import "utils.html" as utils %}
{% block title %}
<title>{{repo.owner.canonical_name}}/{{repo.name}}: {{path_join(*path)}} blame - {{cfg("sr.ht", "site-name")}} git</title>
<title>{{repo.owner.canonical_name}}/{{repo.name}} on {{ ref.decode("utf-8", "replace") }}: {{path_join(*path)}} blame - {{cfg("sr.ht", "site-name")}} git</title>
{% endblock %}
{% block repohead %}
<style>
diff --git a/gitsrht/templates/blob.html b/gitsrht/templates/blob.html
index aabd676..3099415 100644
--- a/gitsrht/templates/blob.html
+++ b/gitsrht/templates/blob.html
@@ -1,7 +1,7 @@
{% extends "repo-full.html" %}
{% import "utils.html" as utils %}
{% block title %}
<title>{{repo.owner.canonical_name}}/{{repo.name}}: {{path_join(*path)}} - {{cfg("sr.ht", "site-name")}} git</title>
<title>{{repo.owner.canonical_name}}/{{repo.name}} on {{ ref.decode("utf-8", "replace") }}: {{path_join(*path)}} - {{cfg("sr.ht", "site-name")}} git</title>
{% endblock %}
{% block repohead %}
<style>
diff --git a/gitsrht/templates/tree.html b/gitsrht/templates/tree.html
index c5db400..109ee6b 100644
--- a/gitsrht/templates/tree.html
+++ b/gitsrht/templates/tree.html
@@ -1,7 +1,7 @@
{% extends "repo.html" %}
{% import "utils.html" as utils %}
{% block title %}
<title>{{repo.owner.canonical_name}}/{{repo.name}}: {{path_join(*path)}}/ - {{cfg("sr.ht", "site-name")}} git</title>
<title>{{repo.owner.canonical_name}}/{{repo.name}} on {{ ref.decode("utf-8", "replace") }}: {{path_join(*path)}}/ - {{cfg("sr.ht", "site-name")}} git</title>
{% endblock %}
{% block content %}
<div class="header-extension">
-- 
2.42.0

[git.sr.ht/patches] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CWWTJON8GX9C.1JM7P6JN9IKXT@cirno2>
In-Reply-To
<20231112115825.14822-2-gabriel@augendre.info> (view parent)
DKIM signature
missing
Download raw message
git.sr.ht/patches: FAILED in 7m7s

[show ref in title][0] from [Gabriel Augendre][1]

[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/46637
[1]: gabriel@augendre.info

✗ #1092842 FAILED  git.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/1092842
✓ #1092843 SUCCESS git.sr.ht/patches/debian.yml    https://builds.sr.ht/~sircmpwn/job/1092843
✓ #1092841 SUCCESS git.sr.ht/patches/alpine.yml    https://builds.sr.ht/~sircmpwn/job/1092841
Details
Message ID
<-b-n7wktgp30LC5bm_D7AocMB8E4TCTwi-6xnbe922CTcRG7fwL1swbU4IgrOZuZK-WmjYLDreuqYgMsDOb0TYksoVwQlSc6ozQe1yge_Z4=@emersion.fr>
In-Reply-To
<20231112115825.14822-2-gabriel@augendre.info> (view parent)
DKIM signature
missing
Download raw message
Do we want to print the branch name if it's the default branch?
Details
Message ID
<22151196-3ADA-48BD-892F-A5FD09D8C39F@augendre.info>
In-Reply-To
<-b-n7wktgp30LC5bm_D7AocMB8E4TCTwi-6xnbe922CTcRG7fwL1swbU4IgrOZuZK-WmjYLDreuqYgMsDOb0TYksoVwQlSc6ozQe1yge_Z4=@emersion.fr> (view parent)
DKIM signature
missing
Download raw message
My opinion is to always display it, in order to be explicit.
For reference, here's the (short) thread discussing the idea:
https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3CZUiH2lSmaFraZh3g%40dj3ntoo%3E
Details
Message ID
<0d845404-231d-42b5-a2e8-736421402a67@bitfehler.net>
In-Reply-To
<22151196-3ADA-48BD-892F-A5FD09D8C39F@augendre.info> (view parent)
DKIM signature
missing
Download raw message
On 11/12/23 13:17, Gabriel Augendre wrote:
> My opinion is to always display it, in order to be explicit.
> For reference, here's the (short) thread discussing the idea:
> https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3CZUiH2lSmaFraZh3g%40dj3ntoo%3E

Gave this a quick test drive. I really like the idea. I am honestly also 
slightly undecided about showing the default branch (as doing so would 
be slightly inconsistent with the rest of the UI), but do not have a 
strong opinion on that.

What I do not like, however, is the usage of the preposition "on". What 
is being added here is not a branch name, but a git ref in general. That 
may be a branch name, but it might also be a tag, or a raw revision. For 
the latter two, "on" does not make sense. Given the generic nature of a 
ref I have hard time proposing a better proposition, so how about we 
just put it in parenthesis without any preposition at all?

Maybe a native english speaker can weigh in here. If anything, I suppose 
"at" would be more "correct", but it does sound slightly awkward for 
branch names?

Cheers,
Conrad
Details
Message ID
<g4OQukgpI9i300cQkiZP8j8XIVZ0W2aEu1rMG0JfLkdrS8p4XLDNDx__-lZm88OSWqJlwXYCeZhwO2KSYlAw__epp5XL4M08e-KoWVlzXEw=@emersion.fr>
In-Reply-To
<0d845404-231d-42b5-a2e8-736421402a67@bitfehler.net> (view parent)
DKIM signature
missing
Download raw message
Maybe "in"?
Details
Message ID
<ZVc-m-HMqtkDxopV@t480>
In-Reply-To
<0d845404-231d-42b5-a2e8-736421402a67@bitfehler.net> (view parent)
DKIM signature
missing
Download raw message
On Thu, Nov 16, 2023 at 01:12:38PM +0100, Conrad Hoffmann wrote:
> On 11/12/23 13:17, Gabriel Augendre wrote:
> > My opinion is to always display it, in order to be explicit.
> > For reference, here's the (short) thread discussing the idea:
> > https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3CZUiH2lSmaFraZh3g%40dj3ntoo%3E
> 
[...]
> What I do not like, however, is the usage of the preposition "on". What is
> being added here is not a branch name, but a git ref in general. That may be
> a branch name, but it might also be a tag, or a raw revision. For the latter
> two, "on" does not make sense. Given the generic nature of a ref I have hard
> time proposing a better proposition, so how about we just put it in
> parenthesis without any preposition at all?
> 
> Maybe a native english speaker can weigh in here. If anything, I suppose
> "at" would be more "correct", but it does sound slightly awkward for branch
> names?

FWIW, git status uses 'on branch' and 'at commit/tag'.  So I'd say your
gut feeling is correct here.
Details
Message ID
<87159951-858b-43e1-ba86-eded03ef6503@bitfehler.net>
In-Reply-To
<ZVc-m-HMqtkDxopV@t480> (view parent)
DKIM signature
missing
Download raw message
Hey,

just to move this forward, because I think it's quite useful: could you 
kindly submit a v2 that uses "(ref: NAME)" instead of "on NAME"? That's 
generic enough to be correct in all cases and improvements can be worked 
out later if needed.

Cheers,
Conrad
Reply to thread Export thread (mbox)