Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Julia Evans via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	 Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>,
	 Julia Evans <julia@jvns.ca>
Subject: Re: [PATCH v4] doc: checkout: rewrite detached HEAD state explanation
Date: Fri, 16 Oct 2026 15:02:40 -0700	[thread overview]
Message-ID: <xmqqse25cni7.fsf@gitster.g> (raw)
In-Reply-To: <pull.2250.v4.git.1792177409868.gitgitgadget@gmail.com> (Julia Evans via GitGitGadget's message of "Fri, 16 Oct 2026 19:03:29 +0000")

"Julia Evans via GitGitGadget" <gitgitgadget@gmail.com> writes:

>  advice.c                            |   1 +
> ...
> diff --git a/advice.c b/advice.c
> index 401d047391..8d2c1ff1ee 100644
> --- a/advice.c
> +++ b/advice.c
> @@ -291,6 +291,7 @@ void detach_advice(const char *new_name)
>  	"\n"
>  	"  git switch -\n"
>  	"\n"
> +	"Run `git help detached-head` to learn more.\n"
>  	"Turn off this advice by setting config variable advice.detachedHead to false\n\n");
>  
>  	fprintf(stderr, fmt, new_name);

This breaks t2020 without an accompanying change.

You can squash in the attached patch to unbreak the test.

Since nobody's terminal talks markdown or asciidoc, let's use the
vanilla single quote instead of backquote while we are at it.

 advice.c                   | 2 +-
 t/t2020-checkout-detach.sh | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git c/advice.c w/advice.c
index 8d2c1ff1ee..3238e9b866 100644
--- c/advice.c
+++ w/advice.c
@@ -291,7 +291,7 @@ void detach_advice(const char *new_name)
 	"\n"
 	"  git switch -\n"
 	"\n"
-	"Run `git help detached-head` to learn more.\n"
+	"Run 'git help detached-head' to learn more.\n"
 	"Turn off this advice by setting config variable advice.detachedHead to false\n\n");
 
 	fprintf(stderr, fmt, new_name);
diff --git c/t/t2020-checkout-detach.sh w/t/t2020-checkout-detach.sh
index 28bbbe6c05..804dc2a67f 100755
--- c/t/t2020-checkout-detach.sh
+++ w/t/t2020-checkout-detach.sh
@@ -228,6 +228,7 @@ test_expect_success 'describe_detached_head prints no SHA-1 ellipsis when not as
 
 	  git switch -
 
+	Run ${SQ}git help detached-head${SQ} to learn more.
 	Turn off this advice by setting config variable advice.detachedHead to false
 
 	HEAD is now at \$commit three
@@ -310,6 +311,7 @@ test_expect_success 'describe_detached_head does print SHA-1 ellipsis when asked
 
 	  git switch -
 
+	Run ${SQ}git help detached-head${SQ} to learn more.
 	Turn off this advice by setting config variable advice.detachedHead to false
 
 	HEAD is now at \$commit... three

      parent reply	other threads:[~2026-10-16 22:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 14:52 [PATCH] doc: checkout: rewrite detached HEAD state explanation Julia Evans via GitGitGadget
2026-10-07 16:43 ` Junio C Hamano
2026-10-13 12:54   ` Julia Evans
2026-10-07 19:02 ` Kristoffer Haugsbakk
2026-10-13 11:48   ` Julia Evans
2026-10-13 12:20     ` Kristoffer Haugsbakk
2026-10-13 12:27       ` Julia Evans
2026-10-13 12:42         ` Julia Evans
2026-10-13 13:01 ` [PATCH v2] " Julia Evans via GitGitGadget
2026-10-14 18:52   ` Junio C Hamano
2026-10-14 21:10     ` Julia Evans
2026-10-15 20:58 ` [PATCH v3] " Julia Evans via GitGitGadget
2026-10-15 22:39   ` Junio C Hamano
2026-10-16 14:55     ` Julia Evans
2026-10-16 17:03       ` Junio C Hamano
2026-10-16 18:35         ` Julia Evans
2026-10-16 19:05           ` Junio C Hamano
2026-10-16 19:03 ` [PATCH v4] " Julia Evans via GitGitGadget
2026-10-16 21:10   ` Junio C Hamano
2026-10-16 22:02   ` Junio C Hamano [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqse25cni7.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=julia@jvns.ca \
    --cc=kristofferhaugsbakk@fastmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox