git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] checkout: add a space between the commit and "..."

From
Aaron Plattner <aplattner@nvidia.com>
Date
Sep 28, 2010, 22:23 UTC
Message-ID
<20100928222332.GA28859@soprano.nvidia.com>
Switching to a detached head prints something like
  HEAD is now at 9d14017... dir.c: squelch false uninitialized memory warning

These dots get selected when you double-click on the abbreviated commit hash, which makes it annoying to copy and paste.

Add a space between the abbreviated commit and the dots, to improve copy and pasteability.

Reported-by: Joe Kain <jkain@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
---
 builtin/checkout.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/checkout.c b/builtin/checkout.c
index a54583b..ca1cae3 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -303,7 +303,7 @@ static void describe_detached_head(char *msg, struct commit *commit)
 	struct pretty_print_context ctx = {0};
 	parse_commit(commit);
 	pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, &ctx);
-	fprintf(stderr, "%s %s... %s\n", msg,
+	fprintf(stderr, "%s %s ... %s\n", msg,
 		find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV), sb.buf);
 	strbuf_release(&sb);
 }
-- 
1.7.0.4
Next: Brandon Casey
Message 1 of 9 in “checkout: add a space between the commit and "..."”
  1. checkout: add a space between the commit and "..."Aaron Plattner, Sep 28, 2010
  2. Brandon CaseySep 28, 2010
  3. Kevin BallardSep 28, 2010
  4. Aaron PlattnerSep 28, 2010
  5. Brandon CaseySep 29, 2010
  6. Johannes SixtSep 29, 2010
  7. Brandon CaseySep 29, 2010
  8. Andreas SchwabSep 29, 2010
  9. Santi BéjarSep 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.