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

Re: [PATCH v4 1/2] stash: reserve exit status 1 for conflicts

From
Harald Nordgren <haraldnordgren@gmail.com>
Date
Sep 4, 2026, 16:42 UTC
Message-ID
<CAHwyqnXoxmgstsczTkkFDQbi2oN5aH8sg57zBtj1WEvqWy_zRg@mail.gmail.com>
In-Reply-To
<99b6da14-e03a-472b-b7a3-81162dc74166@gmail.com>
On Fri, Sep 4, 2026 at 5:09 PM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 19 quoted lines
>
> [Cc'd Karthik for a view on the CI style job]
>
> On 04/09/2026 09:16, Harald Nordgren wrote:
> >> A local "make style" while you develop runs
> >>
> >>          git clang-format --style file --diff --extensions c,h
> >>
> >> which tells the command to check only the parts of the system that
> >> you touched.
> >>
> >> I do not think it is used in CI.
> >
> > It seems to run as part of CI and doesn't catch it then:
> > '.github/workflows/check-style.yml'
>
> My recollection is that we made that job never fail because clang-format
> does not always do a good job of following our style guide and the
> output is not guaranteed to be stable across different versions.

Thanks for the history! Seems that when linter output is not consistent between versions, then version pinning is necessary.

Show 5 quoted lines
> That
> makes its value debatable as I don't think many people (anyone?) bother
> checking the output to see what suggestions it made. It would be a lot
> simpler for contributors if we just devolved style decisions to
> clang-format so no one had to think about or comment on the style.

My professional opinion is that a consistent style, auto-enforceable + auto-fixable, is extremely valuable, because it removes an entire class of code review discussions. I almost never care which style is chosen, as long as it's the same everywhere.

I tried today to apply the full clang-format output and it was A LOT. Doesn't mean it shouldn't be done, but it would need to be done at a carefully chosen time because there will be lots of conflicts on all in-flight topics.

> Whether that tradeoff is worth it depends on how far the output of
> clang-format deviates from our preferred style.

In the best of worlds, the preferred style is exactly what the linter dictates, then these two are equivalent.

Harald
Previous: Phillip WoodNext: Junio C Hamano
Message 29 of 37 in “checkout -m: refine autostash fallback”
  1. 0/2 checkout -m: refine autostash fallbackHarald Nordgren via GitGitGadget, Jul 25, 2026
  2. 1/2 sequencer: teach autostash apply to report conflictsHarald Nordgren via GitGitGadget, Jul 25, 2026
  3. Phillip WoodAug 27, 2026
  4. Harald NordgrenAug 31, 2026
  5. phillip.wood123@gmail.comAug 31, 2026
  6. 2/2 checkout -m: refine autostash fallbackHarald Nordgren via GitGitGadget, Jul 25, 2026
  7. Junio C HamanoJul 28, 2026
  8. Phillip WoodAug 27, 2026
  9. Junio C HamanoAug 26, 2026
  10. Phillip WoodAug 27, 2026
  11. checkout: print blank line after autostash conflict adviceHarald Nordgren via GitGitGadget, Aug 31, 2026
  12. Junio C HamanoAug 31, 2026
  13. Phillip WoodSep 1, 2026
  14. Junio C HamanoSep 1, 2026
  15. checkout: separate autostash conflict advice from branch-switch messageHarald Nordgren via GitGitGadget, Sep 1, 2026
  16. Phillip WoodSep 1, 2026
  17. Junio C HamanoSep 1, 2026
  18. 0/2 checkout -m: refine autostash fallbackHarald Nordgren via GitGitGadget, Sep 2, 2026
  19. 1/2 stash: reserve exit status 1 for conflictsHarald Nordgren via GitGitGadget, Sep 2, 2026
  20. Junio C HamanoSep 2, 2026
  21. Junio C HamanoSep 2, 2026
  22. Phillip WoodSep 3, 2026
  23. Harald NordgrenSep 3, 2026
  24. Junio C HamanoSep 3, 2026
  25. Harald NordgrenSep 3, 2026
  26. Junio C HamanoSep 3, 2026
  27. Harald NordgrenSep 4, 2026
  28. Phillip WoodSep 4, 2026
  29. Harald NordgrenSep 4, 2026
  30. Junio C HamanoSep 4, 2026
  31. 2/2 checkout: separate autostash conflict advice from branch-switch messageHarald Nordgren via GitGitGadget, Sep 2, 2026
  32. Junio C HamanoSep 2, 2026
  33. Phillip WoodSep 3, 2026
  34. 0/2 checkout -m: refine autostash fallbackHarald Nordgren via GitGitGadget, Sep 3, 2026
  35. 1/2 stash: reserve exit status 1 for conflictsHarald Nordgren via GitGitGadget, Sep 3, 2026
  36. 2/2 checkout: separate autostash conflict advice from branch-switch messageHarald Nordgren via GitGitGadget, Sep 3, 2026
  37. Junio C HamanoSep 3, 2026

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.