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

Re: [PATCH] doc: explain the impact of stash.index on --autostash options

From
D. Ben Knoble <ben.knoble+github@gmail.com>
Date
Oct 11, 2025, 14:44 UTC
Message-ID
<CALnO6CA0SEGrzsrS_yqZ3Ztep0Gi=zPFjjGzSW94EvDW8RZ2Bg@mail.gmail.com>
In-Reply-To
<e77d07d0-c26e-4d91-9777-ebaffffd764c@app.fastmail.com>

On Thu, Oct 9, 2025 at 6:55 PM Kristoffer Haugsbakk <code@khaugsbakk.name> wrote:

Show 16 quoted lines
>
> 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.

Show 9 quoted lines
> > merged in a5d4779e6e (Merge branch 'dk/stash-apply-index',
> > 2025-09-29),
>
> 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.

Indeed. I think I wanted to call out the topic branch this was part of, especially since my understanding of the process of queueing patches on top of in-flight topics is shaky from parts of Documentation/SubmittingPatches and …/howto/maintain-git:

 * A topic already in 'next' can get fixes while still in
   'next'.  Such a topic will have many merges to 'next' (in
   other words, "git log --first-parent next" will show many
   "Merge branch 'ai/topic' to next" for the same topic.

So, idk. If the eventual merge to master won't have the prior "topic merge," it's probably important to omit (since the final topology of master won't contain the referenced commit). In this case, since that merge _is_ part of master, it seemed worth explaining what topic we were improving.

Show 22 quoted lines
> > diff --git a/Documentation/config/stash.adoc b/Documentation/config/stash.adoc
> > index e556105a15..fcb9a4a7a0 100644
> > --- a/Documentation/config/stash.adoc
> > +++ b/Documentation/config/stash.adoc
> > @@ -2,6 +2,10 @@ stash.index::
> >       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)

Indeed. I'm not sure where autostash might be introduced in the future (git-history?), so it might be more "hedge" by way of "listing examples" than necessary.

I could go either way on all of this, so will defer to guidance from others (but don't have the impetus to rewrite without a strong opinion at the moment).

Previous: Kristoffer HaugsbakkNext: Junio C Hamano
Message 34 of 38 in “make stash apply with --index by default”
  1. 0/9 make stash apply with --index by defaultD. Ben Knoble, May 10, 2025
  2. 1/9 t3903: reduce dependencies on previous testsD. Ben Knoble, May 10, 2025
  3. 2/9 t3905: remove unneeded blank lineD. Ben Knoble, May 10, 2025
  4. 3/9 BreakingChanges: announce stash {apply,pop} will imply --indexD. Ben Knoble, May 10, 2025
  5. 4/9 stash: restore the index by default when breaking changes are enabledD. Ben Knoble, May 10, 2025
  6. 5/9 t0450: mark stash documentation as a known discrepancyD. Ben Knoble, May 10, 2025
  7. 6/9 t3903: adjust stash test to account for --[no-]index with breaking changesD. Ben Knoble, May 10, 2025
  8. 7/9 t3904: adjust stash -p test to account for index states with breaking changesD. Ben Knoble, May 10, 2025
  9. 8/9 t3905: adjust stash -u tests for breaking changesD. Ben Knoble, May 10, 2025
  10. 9/9 t3906: adjust stash submodule tests to account for breaking changesD. Ben Knoble, May 10, 2025
  11. Junio C HamanoMay 12, 2025
  12. D. Ben KnobleMay 20, 2025
  13. D. Ben KnobleMay 20, 2025
  14. 0/4 Teach git-stash to use --index from configD. Ben Knoble, Sep 16, 2025
  15. 1/4 t3903: reduce dependencies on previous testsD. Ben Knoble, Sep 16, 2025
  16. 2/4 t3905: remove unneeded blank lineD. Ben Knoble, Sep 16, 2025
  17. 3/4 stash: refactor private config globalsD. Ben Knoble, Sep 16, 2025
  18. 4/4 stash: honor stash.index in apply, pop modesD. Ben Knoble, Sep 16, 2025
  19. Phillip WoodSep 16, 2025
  20. D. Ben KnobleSep 16, 2025
  21. Phillip WoodSep 16, 2025
  22. D. Ben KnobleSep 16, 2025
  23. Junio C HamanoSep 16, 2025
  24. 0/4 Teach git-stash to use --index from configD. Ben Knoble, Sep 22, 2025
  25. 1/4 t3903: reduce dependencies on previous testsD. Ben Knoble, Sep 22, 2025
  26. 2/4 t3905: remove unneeded blank lineD. Ben Knoble, Sep 22, 2025
  27. 3/4 stash: refactor private config globalsD. Ben Knoble, Sep 22, 2025
  28. 4/4 stash: honor stash.index in apply, pop modesD. Ben Knoble, Sep 22, 2025
  29. Phillip WoodSep 22, 2025
  30. D. Ben KnobleSep 24, 2025
  31. Phillip WoodSep 29, 2025
  32. doc: explain the impact of stash.index on --autostash optionsD. Ben Knoble, Oct 6, 2025
  33. Kristoffer HaugsbakkOct 9, 2025
  34. D. Ben KnobleOct 11, 2025
  35. Junio C HamanoOct 11, 2025
  36. Ben KnobleOct 12, 2025
  37. Kristoffer HaugsbakkOct 13, 2025
  38. D. Ben KnobleOct 14, 2025

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.