From: Junio C Hamano <gitster@pobox.com>
To: Arsh Srivastava <arshsrivastava00@gmail.com>
Cc: Arsh Srivastava via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Phillip Wood <phillip.wood123@gmail.com>,
Patrick Steinhardt <ps@pks.im>,
Karthik Nayak <karthik.188@gmail.com>
Subject: Re: [PATCH v6] unpack-trees: suggesting 'git checkout -m' with its repercussions
Date: Thu, 12 Mar 2026 11:56:37 -0700 [thread overview]
Message-ID: <xmqqwlzgev16.fsf@gitster.g> (raw)
In-Reply-To: <CAOAgETN-UVtee5OjjcLE45sRxajCkgF3nipBqXpec4JjN8+vfw@mail.gmail.com> (Arsh Srivastava's message of "Thu, 12 Mar 2026 23:43:15 +0530")
Arsh Srivastava <arshsrivastava00@gmail.com> writes:
> Junio C Hamano <gitster@pobox.com> writes :
>> The commit message should focus on the "why" and "what" from a user perspective, following the project's standard format (problem description, then solution).
>> Also showed an example for the same.
>> Also, note that "extention" is a typo; it should be "extension".
>> Having said that, I am not sure if we want to suggest "checkout -m" in this situation after all.
>> Pointed out the difference between "stash" and "checkout -m".
>> When advice requires a multi-line warning about potential data loss.
>> The goal of these messages should be to provide a clear, safe next step, not a list of advanced alternatives with caveats.
>> After all, the users who need such an "it failed, now what should I do to recover?" message the most are relatively inexperienced users and we do not want the advice to be overwhelming.
>> Suggesting this "one-shot" approach to a user who is already in a state of friction (and likely less experienced) might be providing them with a "foot-gun" rather than a helpful tip. Generally, advice that nudges users toward the safest "golden paths" like stashing or committing is preferred.
>> For a microproject, you've successfully demonstrated that you can modify the advice system and update the test suite.
>> it might be better to drop the 'checkout -m' suggestion and instead focus on making the existing 'stash' and 'commit' advice as clear and helpful as possible.
I wonder where this came from, as it is quite unusual to have a
rephrased summary of what you respond to. Is this LLM-generated
summary that was copied-and-pasted without much human brain effort?
What is more usual is to quote the message you are responding to,
trim the parts you are not going to comment on and not necessary for
bystanders to read in order to understand your response, and then
sprinkle your comments in between the parts of the quoted message,
instead of saying only your thing before the message you are
responding to without trimming (which is highly frowned upon, and
people often tell you not to "top-post").
next prev parent reply other threads:[~2026-03-12 18:56 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 8:51 [PATCH 0/5] Advice on checkout dirty files Arsh Srivastava via GitGitGadget
2026-03-10 8:51 ` [PATCH 1/5] diff: handle ANSI escape codes in prefix when calculating diffstat width LorenzoPegorari via GitGitGadget
2026-03-10 8:51 ` [PATCH 2/5] t4052: test for diffstat width when prefix contains ANSI escape codes LorenzoPegorari via GitGitGadget
2026-03-10 8:51 ` [PATCH 3/5] repo: remove unnecessary variable shadow K Jayatheerth via GitGitGadget
2026-03-10 8:51 ` [PATCH 4/5] The 13th batch Junio C Hamano via GitGitGadget
2026-03-10 8:51 ` [PATCH 5/5] advice: add stashBeforeCheckout advice for dirty branch switches Arsh Srivastava via GitGitGadget
2026-03-10 10:33 ` [PATCH 0/5] Advice on checkout dirty files Phillip Wood
2026-03-10 10:42 ` Arsh Srivastava
2026-03-10 10:45 ` Arsh Srivastava
2026-03-10 13:36 ` Junio C Hamano
2026-03-10 13:40 ` Arsh Srivastava
2026-03-10 15:40 ` Junio C Hamano
2026-03-10 16:05 ` Arsh Srivastava
2026-03-10 16:08 ` Arsh Srivastava
2026-03-10 10:59 ` [PATCH v2] advice: add stashBeforeCheckout advice for dirty branch switches Arsh Srivastava via GitGitGadget
[not found] ` <CAOAgETOebObfZNWA5LWMDxYv8YXYpbrb9L3_ASs_AbQjiQZYZw@mail.gmail.com>
2026-03-10 11:04 ` Arsh Srivastava
2026-03-10 13:16 ` Patrick Steinhardt
2026-03-10 13:36 ` Arsh Srivastava
2026-03-10 14:24 ` Patrick Steinhardt
2026-03-10 13:28 ` [PATCH v3 0/2] Advice on checkout dirty files Arsh Srivastava via GitGitGadget
2026-03-10 13:28 ` [PATCH v3 1/2] advice: add stashBeforeCheckout advice for dirty branch switches Arsh Srivastava via GitGitGadget
2026-03-10 13:43 ` Arsh Srivastava
2026-03-10 13:28 ` [PATCH v3 2/2] advice: add stashBeforeCheckout advice for dirty branch switches [GSOC] Arsh Srivastava via GitGitGadget
2026-03-11 8:50 ` [PATCH v4 0/5] Advice on checkout dirty files Arsh Srivastava via GitGitGadget
2026-03-11 8:50 ` [PATCH v4 1/5] advice: add stashBeforeCheckout advice for dirty branch switches Arsh Srivastava via GitGitGadget
2026-03-11 8:50 ` [PATCH v4 2/5] advice: add stashBeforeCheckout advice for dirty branch switches [GSOC] Arsh Srivastava via GitGitGadget
2026-03-11 8:50 ` [PATCH v4 3/5] unpack-trees: suggesting 'git checkout -m <branch>' with its repercussions Arsh Srivastava via GitGitGadget
2026-03-11 8:50 ` [PATCH v4 4/5] Updating tests and unpack-tress.c [GSOC] Arsh Srivastava via GitGitGadget
2026-03-11 8:50 ` [PATCH v4 5/5] File updation [GSOC] Arsh Srivastava via GitGitGadget
2026-03-11 16:38 ` [PATCH v4 0/5] Advice on checkout dirty files Junio C Hamano
2026-03-11 17:06 ` Arsh Srivastava
2026-03-11 17:49 ` [PATCH v5 0/3] " Arsh Srivastava via GitGitGadget
2026-03-11 17:49 ` [PATCH v5 1/3] advice: add stashBeforeCheckout advice for dirty branch switches Arsh Srivastava via GitGitGadget
2026-03-11 17:49 ` [PATCH v5 2/3] advice: add stashBeforeCheckout advice for dirty branch switches [GSOC] Arsh Srivastava via GitGitGadget
2026-03-11 17:49 ` [PATCH v5 3/3] unpack-trees: suggesting 'git checkout -m <branch>' with its repercussions Arsh Srivastava via GitGitGadget
2026-03-12 1:02 ` [PATCH v5 0/3] Advice on checkout dirty files Junio C Hamano
2026-03-12 3:32 ` Arsh Srivastava
2026-03-12 4:00 ` [PATCH v6] unpack-trees: suggesting 'git checkout -m' with its repercussions Arsh Srivastava via GitGitGadget
2026-03-12 16:06 ` Junio C Hamano
2026-03-12 18:13 ` Arsh Srivastava
2026-03-12 18:56 ` Junio C Hamano [this message]
2026-03-12 19:03 ` Arsh Srivastava
2026-03-12 19:07 ` Junio C Hamano
2026-03-12 19:12 ` Arsh Srivastava
2026-03-12 20:05 ` [PATCH v7] unpack-trees: suggest using 'git stash' when checkout fails Arsh Srivastava via GitGitGadget
2026-03-12 22:40 ` Junio C Hamano
2026-03-13 3:13 ` Arsh Srivastava
2026-03-13 10:43 ` Karthik Nayak
2026-03-13 11:02 ` Arsh Srivastava
2026-03-13 22:05 ` Junio C Hamano
2026-03-13 10:49 ` Arsh Srivastava
2026-03-13 11:04 ` Arsh Srivastava
2026-03-10 14:31 ` [PATCH v2] advice: add stashBeforeCheckout advice for dirty branch switches Karthik Nayak
2026-03-10 14:37 ` Arsh Srivastava
2026-03-10 14:40 ` Arsh Srivastava
2026-03-10 17:15 ` Karthik Nayak
2026-03-10 18:00 ` Arsh Srivastava
2026-03-10 14:41 ` Arsh Srivastava
2026-03-10 16:48 ` Junio C Hamano
2026-03-10 17:09 ` Karthik Nayak
2026-03-14 4:27 ` Konstantin Ryabitsev
2026-03-10 17:56 ` Arsh Srivastava
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=xmqqwlzgev16.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=arshsrivastava00@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=karthik.188@gmail.com \
--cc=phillip.wood123@gmail.com \
--cc=ps@pks.im \
/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