git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "D. Ben Knoble" <ben.knoble+github@gmail.com>
Cc: "Kristoffer Haugsbakk" <code@khaugsbakk.name>,
	git@vger.kernel.org, "Phillip Wood" <phillip.wood123@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Glen Choo" <glencbz@gmail.com>,
	"Karthik Nayak" <karthik.188@gmail.com>,
	"Denton Liu" <liu.denton@gmail.com>,
	motisd8@gmail.com, "Phillip Wood" <phillip.wood@dunelm.org.uk>,
	"Patrick Steinhardt" <ps@pks.im>
Subject: Re: [PATCH] doc: explain the impact of stash.index on --autostash options
Date: Sat, 11 Oct 2025 10:28:59 -0700	[thread overview]
Message-ID: <xmqqy0ph5ov8.fsf@gitster.g> (raw)
In-Reply-To: <CALnO6CA0SEGrzsrS_yqZ3Ztep0Gi=zPFjjGzSW94EvDW8RZ2Bg@mail.gmail.com> (D. Ben Knoble's message of "Sat, 11 Oct 2025 10:44:22 -0400")

"D. Ben Knoble" <ben.knoble+github@gmail.com> writes:

> On Thu, Oct 9, 2025 at 6:55 PM Kristoffer Haugsbakk
> <code@khaugsbakk.name> wrote:
>>
>> This follow-up patch makes sense.
>>
>> • It reads like a logical continuation of the previous commit 9842c0c749
>> • The log message is clear (and with no spelling mistakes)
>> • The markup is correct (list continuation, links)
>> • `make lint-docs` passes
>> • `./ci/check-whitespace.sh @^` passes
>>
>> On Mon, Oct 6, 2025, at 14:59, D. Ben Knoble wrote:
>> > With 9842c0c749 (stash: honor stash.index in apply, pop modes,
>> > 2025-09-21)
>>
>> Curiously, since this is also the base commit, referring to “the
>> previous commit” would also work if this patch is indeed applied on top
>> of that one. But maybe that contextual reference is a bad idea?
> Generally I think so, but that's just my preference. Once commits have
> stable reference points, I'd rather use that. But I'm not attached to
> this one, so if we end up re-rolling, I can adjust either way.

That matches my preference, too.  Use of relative "previous" or
"next", unless they are in the same series, can make things
confusing.

For example, you could say something silly like "The test added in
the previous commit revealed age-old bug.  Here is a fix and more
test", and the fix may be important enough that it wants to be
forked from a maintenance track that is far older than the "previous"
commit.

>> This is over-specified IMO. Like mentioned this patch could be applied
>> on top of commit 9842c0c749. Then that merge commit will not be
>> reachable from this resulting commit.
>>
>> I also don’t see the point of mentioning when things were merged in in
>> the commit message.

Yeah, that is less useful to me (there is a tool, given a commit
object, to figure out at which merge it got merged to the mainline);
I didn't think of a way the information can be useful to general
readers.  If the mainline merge was a release or more ago, then it
may make sense to say "commit X, which appeared in version Y, was
broken in such and such way, and here is to fix its breakage".

>> >       If this is set to true, `git stash apply` and `git stash pop` will
>> >       behave as if `--index` was supplied. Defaults to false. See the
>> >       descriptions in linkgit:git-stash[1].
>> > ++
>> > +This also affects invocations of linkgit:git-stash[1] via `--autostash` from
>> > +commands like linkgit:git-merge[1], linkgit:git-rebase[1], and
>> > +linkgit:git-pull[1].
>>
>> According to these
>>
>> • `git grep -- --autostash`
>> • `git grep merge-options.adoc`
>>
>> This text exhaustively covers all commands which have this option.
>>
>> ... which might mean that “like” is an unneeded hedge? (it’s probably
>> not intended to be a hedge)

You have to devise a way to somehow ensure that a list, which
happens to be exhaustive right now, stays exhaustive, if you present
it as authoritative exhaustive list to your readers.  But as long as
the list covers the use cases majority of readers would encounter
every day, it does not make the list any less useful even if it were
not exhausitive (and does not pretend to be).

So I prefer to keep the presented text than making it sound an
authoritative exhaustive list and add maintenance cost.

Thanks.

      reply	other threads:[~2025-10-11 17:29 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-10 18:33 [PATCH 0/9] make stash apply with --index by default D. Ben Knoble
2025-05-10 18:33 ` [PATCH 1/9] t3903: reduce dependencies on previous tests D. Ben Knoble
2025-05-10 18:33 ` [PATCH 2/9] t3905: remove unneeded blank line D. Ben Knoble
2025-05-10 18:33 ` [PATCH 3/9] BreakingChanges: announce stash {apply,pop} will imply --index D. Ben Knoble
2025-05-10 18:33 ` [PATCH 4/9] stash: restore the index by default when breaking changes are enabled D. Ben Knoble
2025-05-10 18:33 ` [PATCH 5/9] t0450: mark stash documentation as a known discrepancy D. Ben Knoble
2025-05-10 18:33 ` [PATCH 6/9] t3903: adjust stash test to account for --[no-]index with breaking changes D. Ben Knoble
2025-05-10 18:33 ` [PATCH 7/9] t3904: adjust stash -p test to account for index states " D. Ben Knoble
2025-05-10 18:33 ` [PATCH 8/9] t3905: adjust stash -u tests for " D. Ben Knoble
2025-05-10 18:33 ` [PATCH 9/9] t3906: adjust stash submodule tests to account " D. Ben Knoble
2025-05-12 12:52 ` [PATCH 0/9] make stash apply with --index by default Junio C Hamano
2025-05-20 14:36 ` D. Ben Knoble
2025-05-20 14:39 ` D. Ben Knoble
2025-09-16  0:37 ` [PATCH v2 0/4] Teach git-stash to use --index from config D. Ben Knoble
2025-09-16  0:37   ` [PATCH v2 1/4] t3903: reduce dependencies on previous tests D. Ben Knoble
2025-09-16  0:37   ` [PATCH v2 2/4] t3905: remove unneeded blank line D. Ben Knoble
2025-09-16  0:37   ` [PATCH v2 3/4] stash: refactor private config globals D. Ben Knoble
2025-09-16  0:37   ` [PATCH v2 4/4] stash: honor stash.index in apply, pop modes D. Ben Knoble
2025-09-16  9:18     ` Phillip Wood
2025-09-16 17:07       ` D. Ben Knoble
2025-09-16  9:24   ` [PATCH v2 0/4] Teach git-stash to use --index from config Phillip Wood
2025-09-16 17:06     ` D. Ben Knoble
2025-09-16 16:49   ` Junio C Hamano
2025-09-22  1:39   ` [PATCH v3 " D. Ben Knoble
2025-09-22  1:39     ` [PATCH v3 1/4] t3903: reduce dependencies on previous tests D. Ben Knoble
2025-09-22  1:39     ` [PATCH v3 2/4] t3905: remove unneeded blank line D. Ben Knoble
2025-09-22  1:39     ` [PATCH v3 3/4] stash: refactor private config globals D. Ben Knoble
2025-09-22  1:39     ` [PATCH v3 4/4] stash: honor stash.index in apply, pop modes D. Ben Knoble
2025-09-22 14:11       ` Phillip Wood
2025-09-24 20:40         ` D. Ben Knoble
2025-09-29 10:01           ` Phillip Wood
2025-10-06 12:59             ` [PATCH] doc: explain the impact of stash.index on --autostash options D. Ben Knoble
2025-10-09 22:54               ` Kristoffer Haugsbakk
2025-10-11 14:44                 ` D. Ben Knoble
2025-10-11 17:28                   ` 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=xmqqy0ph5ov8.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=ben.knoble+github@gmail.com \
    --cc=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    --cc=glencbz@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=liu.denton@gmail.com \
    --cc=motisd8@gmail.com \
    --cc=phillip.wood123@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --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;
as well as URLs for NNTP newsgroup(s).