From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Jan Judas" <snugar.i@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH] gc: remove trailing dot from "gc.log" line
Date: Tue, 31 Aug 2021 16:37:29 +0200 [thread overview]
Message-ID: <patch-1.1-27f00a664e6-20210831T143536Z-avarab@gmail.com> (raw)
In-Reply-To: <CAO=eiXzPaRpEV_nsudvvCUbNab+oMxR8b9rsehjdyc4WMHe3OA@mail.gmail.com>
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
next prev parent reply other threads:[~2021-08-31 14:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-31 13:46 UX suggestion Jan Judas
2021-08-31 14:37 ` Ævar Arnfjörð Bjarmason [this message]
2021-08-31 16:15 ` [PATCH] gc: remove trailing dot from "gc.log" line 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=patch-1.1-27f00a664e6-20210831T143536Z-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=snugar.i@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).