git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* UX suggestion
@ 2021-08-31 13:46 Jan Judas
  2021-08-31 14:37 ` [PATCH] gc: remove trailing dot from "gc.log" line Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Judas @ 2021-08-31 13:46 UTC (permalink / raw)
  To: git

Hello,

first time posting here, I hope I'm doing it right.
I'd like to suggest a very minor UX improvement regarding the message:

error: The last gc run reported the following. Please correct the root cause
and remove /path/to/repo/.git/gc.log.

Currently, there is a dot after the file path, so it's impossible to
select just the path using double-click. If the dot was removed, or
separated from the path by a space, it would be slightly more
convenient :-)

Thank you

Jan Judas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] gc: remove trailing dot from "gc.log" line
  2021-08-31 13:46 UX suggestion Jan Judas
@ 2021-08-31 14:37 ` Ævar Arnfjörð Bjarmason
  2021-08-31 16:15   ` Eric Sunshine
  2021-09-02 17:27   ` Jan Judas
  0 siblings, 2 replies; 8+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-08-31 14:37 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Jan Judas, Ævar Arnfjörð Bjarmason

Remove the trailing dot from the warning we emit about gc.log. It's
common for various terminal UX's to allow the user to select "words",
and by including the trailing dot a user wanting to select the path to
gc.log will need to manually remove the trailing dot.

Such a user would also probably need to adjust the path if it e.g. had
spaces in it, but this should address this very common case.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Suggested-by: Jan Judas <snugar.i@gmail.com>
---

On Tue, Aug 31 2021, Jan Judas wrote:

> Hello,
>
> first time posting here, I hope I'm doing it right.
> I'd like to suggest a very minor UX improvement regarding the message:

This is the right place for this request. Thanks!

> error: The last gc run reported the following. Please correct the root cause
> and remove /path/to/repo/.git/gc.log.
>
> Currently, there is a dot after the file path, so it's impossible to
> select just the path using double-click. If the dot was removed, or
> separated from the path by a space, it would be slightly more
> convenient :-)
>
> Thank you
>
> Jan Judas   

Yes that's annoying, here's a proposed patch to fix this.

As an aside I've also noticed that if you have multiple worktrees
we'll trigger "git gc --auto" in each one, and then litter various
per-worktree gc.log, even though the issues being noted are usually
repository-global, e.g. too many loose objects.

That's per-se unrelated to the issue you're noting, but is usually why
I end up having to manually remove gc.log files...

 builtin/gc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/gc.c b/builtin/gc.c
index 6ce5ca45126..69c058533ea 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -502,7 +502,7 @@ static int report_last_gc_error(void)
 		 */
 		warning(_("The last gc run reported the following. "
 			       "Please correct the root cause\n"
-			       "and remove %s.\n"
+			       "and remove %s\n"
 			       "Automatic cleanup will not be performed "
 			       "until the file is removed.\n\n"
 			       "%s"),
-- 
2.33.0.805.g739b16c2189


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gc: remove trailing dot from "gc.log" line
  2021-08-31 14:37 ` [PATCH] gc: remove trailing dot from "gc.log" line Ævar Arnfjörð Bjarmason
@ 2021-08-31 16:15   ` Eric Sunshine
  2021-08-31 18:17     ` Junio C Hamano
  2021-09-02 17:27   ` Jan Judas
  1 sibling, 1 reply; 8+ messages in thread
From: Eric Sunshine @ 2021-08-31 16:15 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: Git List, Junio C Hamano, Jan Judas

On Tue, Aug 31, 2021 at 10:37 AM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> Remove the trailing dot from the warning we emit about gc.log. It's
> common for various terminal UX's to allow the user to select "words",
> and by including the trailing dot a user wanting to select the path to
> gc.log will need to manually remove the trailing dot.
>
> Such a user would also probably need to adjust the path if it e.g. had
> spaces in it, but this should address this very common case.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> Suggested-by: Jan Judas <snugar.i@gmail.com>
> ---
> diff --git a/builtin/gc.c b/builtin/gc.c
> @@ -502,7 +502,7 @@ static int report_last_gc_error(void)
>                 warning(_("The last gc run reported the following. "
>                                "Please correct the root cause\n"
> -                              "and remove %s.\n"
> +                              "and remove %s\n"

Bikeshedding: Adding a colon after "remove" would give this a slightly
more grammatically-correct feel:

    Please correct the root cause
    and remove: /path/to/repo/.git/gc.log

>                                "Automatic cleanup will not be performed "
>                                "until the file is removed.\n\n"
>                                "%s"),

Even more bikeshedding:

    Please correct the root cause and remove
    /path/to/repo/.git/gc.log
    to allow automatic cleanup to resume.

or something.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gc: remove trailing dot from "gc.log" line
  2021-08-31 16:15   ` Eric Sunshine
@ 2021-08-31 18:17     ` Junio C Hamano
  2021-08-31 18:23       ` Eric Sunshine
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2021-08-31 18:17 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Ævar Arnfjörð Bjarmason, Git List, Jan Judas

Eric Sunshine <sunshine@sunshineco.com> writes:

> On Tue, Aug 31, 2021 at 10:37 AM Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> Remove the trailing dot from the warning we emit about gc.log. It's
>> common for various terminal UX's to allow the user to select "words",
>> and by including the trailing dot a user wanting to select the path to
>> gc.log will need to manually remove the trailing dot.
>>
>> Such a user would also probably need to adjust the path if it e.g. had
>> spaces in it, but this should address this very common case.
>>
>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>> Suggested-by: Jan Judas <snugar.i@gmail.com>
>> ---
>> diff --git a/builtin/gc.c b/builtin/gc.c
>> @@ -502,7 +502,7 @@ static int report_last_gc_error(void)
>>                 warning(_("The last gc run reported the following. "
>>                                "Please correct the root cause\n"
>> -                              "and remove %s.\n"
>> +                              "and remove %s\n"
>
> Bikeshedding: Adding a colon after "remove" would give this a slightly
> more grammatically-correct feel:
>
>     Please correct the root cause
>     and remove: /path/to/repo/.git/gc.log
>
>>                                "Automatic cleanup will not be performed "
>>                                "until the file is removed.\n\n"
>>                                "%s"),

OK.

> Even more bikeshedding:
>
>     Please correct the root cause and remove
>     /path/to/repo/.git/gc.log
>     to allow automatic cleanup to resume.
>
> or something.

I also found the line break before "and remove" strange, but I think
that is because the "Please" is not at the beginning of the
paragraph, but is a second sentence.  Perhaps unfolding "and remove"
would make the first line overly long?

THanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gc: remove trailing dot from "gc.log" line
  2021-08-31 18:17     ` Junio C Hamano
@ 2021-08-31 18:23       ` Eric Sunshine
  2021-08-31 20:36         ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Sunshine @ 2021-08-31 18:23 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Ævar Arnfjörð Bjarmason, Git List, Jan Judas

On Tue, Aug 31, 2021 at 2:18 PM Junio C Hamano <gitster@pobox.com> wrote:
> Eric Sunshine <sunshine@sunshineco.com> writes:
> > On Tue, Aug 31, 2021 at 10:37 AM Ævar Arnfjörð Bjarmason
> > <avarab@gmail.com> wrote:
> >>                 warning(_("The last gc run reported the following. "
> >>                                "Please correct the root cause\n"
> >> -                              "and remove %s.\n"
> >> +                              "and remove %s\n"
> >
> > Even more bikeshedding:
> >
> >     Please correct the root cause and remove
> >     /path/to/repo/.git/gc.log
> >     to allow automatic cleanup to resume.
> >
> > or something.
>
> I also found the line break before "and remove" strange, but I think
> that is because the "Please" is not at the beginning of the
> paragraph, but is a second sentence.  Perhaps unfolding "and remove"
> would make the first line overly long?

Yep, you're right, and perhaps my "Even more bikeshedding" didn't
clearly indicate that I was bikeshedding more about combining the
"Please correct..." and "Automatic cleanup..." sentences into a single
sentence, both as a another way to deal with the punctuation issue
(thus allowing easy double-click) and to make the whole thing read a
bit better.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gc: remove trailing dot from "gc.log" line
  2021-08-31 18:23       ` Eric Sunshine
@ 2021-08-31 20:36         ` Ævar Arnfjörð Bjarmason
  2021-09-01  2:10           ` Eric Sunshine
  0 siblings, 1 reply; 8+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-08-31 20:36 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Junio C Hamano, Git List, Jan Judas


On Tue, Aug 31 2021, Eric Sunshine wrote:

> On Tue, Aug 31, 2021 at 2:18 PM Junio C Hamano <gitster@pobox.com> wrote:
>> Eric Sunshine <sunshine@sunshineco.com> writes:
>> > On Tue, Aug 31, 2021 at 10:37 AM Ævar Arnfjörð Bjarmason
>> > <avarab@gmail.com> wrote:
>> >>                 warning(_("The last gc run reported the following. "
>> >>                                "Please correct the root cause\n"
>> >> -                              "and remove %s.\n"
>> >> +                              "and remove %s\n"
>> >
>> > Even more bikeshedding:
>> >
>> >     Please correct the root cause and remove
>> >     /path/to/repo/.git/gc.log
>> >     to allow automatic cleanup to resume.
>> >
>> > or something.
>>
>> I also found the line break before "and remove" strange, but I think
>> that is because the "Please" is not at the beginning of the
>> paragraph, but is a second sentence.  Perhaps unfolding "and remove"
>> would make the first line overly long?
>
> Yep, you're right, and perhaps my "Even more bikeshedding" didn't
> clearly indicate that I was bikeshedding more about combining the
> "Please correct..." and "Automatic cleanup..." sentences into a single
> sentence, both as a another way to deal with the punctuation issue
> (thus allowing easy double-click) and to make the whole thing read a
> bit better.

I'm aware that it's not in any formal style guide, but for what it's
worth I find that something like say:

    Eric sent me an E-Mail with the Message-Id
    <CAPig+cTaJ=xm=K5Y8yn8RiOFHBH-nzhRztYRz3kYsqsyJUTACg@mail.gmail.com>
    My E-Mail client is displaying it right now.

Reads unambiguously as having an implied full-stop after "com>",
especially as the next word starts on its own line, and is capitalized
in a way that it wouldn't be if it weren't the start of a sentence.

In any case, I do think just removing the dot on the basis of that
rationale is an improvement, both for the stated ease of copy/pasting,
and to remove the ambiguity of whether the "." is part of the filename
(yeah *nix filenames can also have \n, but that's a lot less likely).

I don't think sometihng like your "Even more bikeshedding" suggestion is
better, since we're trying to continue a sentence after a potentially
long filename that might on some platforms or OS's contain spaces etc.

In any case, I was hoping to just send a quick fix-as-a-patch to a tiny
UX suggestion, and was hoping to not get into the much more subjective
discussion of how to better reword "git gc"'s error messages in
general. If that's where this thread is headed I'm afraid I'll need to
tap out of it :)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gc: remove trailing dot from "gc.log" line
  2021-08-31 20:36         ` Ævar Arnfjörð Bjarmason
@ 2021-09-01  2:10           ` Eric Sunshine
  0 siblings, 0 replies; 8+ messages in thread
From: Eric Sunshine @ 2021-09-01  2:10 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: Junio C Hamano, Git List, Jan Judas

On Tue, Aug 31, 2021 at 4:44 PM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> In any case, I was hoping to just send a quick fix-as-a-patch to a tiny
> UX suggestion, and was hoping to not get into the much more subjective
> discussion of how to better reword "git gc"'s error messages in
> general. If that's where this thread is headed I'm afraid I'll need to
> tap out of it :)

Fair enough. I hope that my explicit mention of "bikeshedding" made it
clear that my comments weren't expectations of change but rather "if
you plan to pursue it further, maybe try these ideas".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gc: remove trailing dot from "gc.log" line
  2021-08-31 14:37 ` [PATCH] gc: remove trailing dot from "gc.log" line Ævar Arnfjörð Bjarmason
  2021-08-31 16:15   ` Eric Sunshine
@ 2021-09-02 17:27   ` Jan Judas
  1 sibling, 0 replies; 8+ messages in thread
From: Jan Judas @ 2021-09-02 17:27 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git, Junio C Hamano

Wow, that was quick!
It's awesome to see a project that is alive and welcoming to new
people (unlike some others I tried to contribute to).
Thanks again and keep up the great work!

Jan

út 31. 8. 2021 v 16:37 odesílatel Ævar Arnfjörð Bjarmason
<avarab@gmail.com> napsal:
>
> Remove the trailing dot from the warning we emit about gc.log. It's
> common for various terminal UX's to allow the user to select "words",
> and by including the trailing dot a user wanting to select the path to
> gc.log will need to manually remove the trailing dot.
>
> Such a user would also probably need to adjust the path if it e.g. had
> spaces in it, but this should address this very common case.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> Suggested-by: Jan Judas <snugar.i@gmail.com>
> ---
>
> On Tue, Aug 31 2021, Jan Judas wrote:
>
> > Hello,
> >
> > first time posting here, I hope I'm doing it right.
> > I'd like to suggest a very minor UX improvement regarding the message:
>
> This is the right place for this request. Thanks!
>
> > error: The last gc run reported the following. Please correct the root cause
> > and remove /path/to/repo/.git/gc.log.
> >
> > Currently, there is a dot after the file path, so it's impossible to
> > select just the path using double-click. If the dot was removed, or
> > separated from the path by a space, it would be slightly more
> > convenient :-)
> >
> > Thank you
> >
> > Jan Judas
>
> Yes that's annoying, here's a proposed patch to fix this.
>
> As an aside I've also noticed that if you have multiple worktrees
> we'll trigger "git gc --auto" in each one, and then litter various
> per-worktree gc.log, even though the issues being noted are usually
> repository-global, e.g. too many loose objects.
>
> That's per-se unrelated to the issue you're noting, but is usually why
> I end up having to manually remove gc.log files...
>
>  builtin/gc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/gc.c b/builtin/gc.c
> index 6ce5ca45126..69c058533ea 100644
> --- a/builtin/gc.c
> +++ b/builtin/gc.c
> @@ -502,7 +502,7 @@ static int report_last_gc_error(void)
>                  */
>                 warning(_("The last gc run reported the following. "
>                                "Please correct the root cause\n"
> -                              "and remove %s.\n"
> +                              "and remove %s\n"
>                                "Automatic cleanup will not be performed "
>                                "until the file is removed.\n\n"
>                                "%s"),
> --
> 2.33.0.805.g739b16c2189
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-02 17:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 13:46 UX suggestion Jan Judas
2021-08-31 14:37 ` [PATCH] gc: remove trailing dot from "gc.log" line Ævar Arnfjörð Bjarmason
2021-08-31 16:15   ` Eric Sunshine
2021-08-31 18:17     ` Junio C Hamano
2021-08-31 18:23       ` Eric Sunshine
2021-08-31 20:36         ` Ævar Arnfjörð Bjarmason
2021-09-01  2:10           ` Eric Sunshine
2021-09-02 17:27   ` Jan Judas

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).