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

Re: [PATCH v3] git-jump: pick a mode automatically when invoked without arguments

From
EEErik Cervin Edin <erik@cervined.in>
Date
May 26, 2026, 21:33 UTC
Message-ID
<ahYN_FeSileUJLGl@mbp>
In-Reply-To
<20260522052821.GC861761@coredump.intra.peff.net>
On 26/05/22 01:28AM, Jeff King wrote:
Show 9 quoted lines
> On Thu, May 21, 2026 at 01:45:09PM +0000, Greg Hurrell via GitGitGadget wrote:
> 
> >      * Don't both teaching "auto" to select "ws" mode, because it is always
> >        subsumed by "diff".
> 
> Dropping the "ws" mode from auto makes sense to me. It could be slotted
> in between "merge" and "diff" (a whitespace problem always implies a
> diff, but a diff does not always imply a whitespace problem). But would
> that actually be useful?

When I originally proposed the idea of a third branch, there was a subtle difference -- it was a git diff --cached --check.

On 26/05/14 05:40PM, Erik Cervin Edin wrote:
Show 5 quoted lines
> If we're going to teach git-jump how to be more clever about where to jump,
> does it also make sense to bake `git jump ws` into this?
> 
>         elif ! git diff --cached --check >/dev/null 2>&1; then
>             mode_ws --cached "$@"

Ever so often I come across file with a diff --check offending white-space (often a missing newline at the end of some file) and because I have a commit hook set up, I have to go looking for where that error is. In this particular case it's always a staged change, and then a *staged* white space problem doesn't imply a diff.

This happens rarely enough that I haven't internalized that I can use "git jump diff --check --cached" and it takes me a while to navigate to the offending files.

But the main suggestion was really considering the possibility to expand this beyond these two auto jumps in the future -- I'm not sure an auto jump that goes looking for staged white spaces issues would be useful to anyone in practise and at this stage I thinks it's best to drop it.

Previous: Greg Hurrell
Message 15 of 15 in “git-jump: pick a mode automatically when invoked without arguments”
  1. git-jump: pick a mode automatically when invoked without argumentsGreg Hurrell via GitGitGadget, May 8, 2026
  2. Jeff KingMay 8, 2026
  3. Greg HurrellMay 8, 2026
  4. Jeff KingMay 8, 2026
  5. Erik Cervin EdinMay 14, 2026
  6. Greg HurrellMay 19, 2026
  7. Jeff KingMay 19, 2026
  8. git-jump: pick a mode automatically when invoked without argumentsGreg Hurrell via GitGitGadget, May 20, 2026
  9. Junio C HamanoMay 21, 2026
  10. Junio C HamanoMay 21, 2026
  11. git-jump: pick a mode automatically when invoked without argumentsGreg Hurrell via GitGitGadget, May 21, 2026
  12. Junio C HamanoMay 21, 2026
  13. Jeff KingMay 22, 2026
  14. Greg HurrellMay 22, 2026
  15. Erik Cervin EdinMay 26, 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.