Re: [PATCH] gc: remove trailing dot from "gc.log" line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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@xxxxxxxxx>
> Suggested-by: Jan Judas <snugar.i@xxxxxxxxx>
> ---
>
> 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
>




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux