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

Re: [PATCH v2] status: list unmerged files last

From
Jeff King <peff@peff.net>
Date
Sep 2, 2009, 05:12 UTC
Message-ID
<20090902051248.GB12046@coredump.intra.peff.net>
In-Reply-To
<7vmy5egefh.fsf@alter.siamese.dyndns.org>
On Tue, Sep 01, 2009 at 09:26:26PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> But not everybody is used to such a set-up.  If you rely on terminal's
> scrollback buffer with mouse and a short terminal, I can see cutting and
> pasting would be an issue.  I do not have a good answer to "tig status",
> but the design principle of supporting the lowest denominator is
> important.

But I'm not sure it is about "lowest common denominator". I think it is about different people having different preferences (as a matter of fact, I use an 80x25 terminal most of the time, and I think I prefer the content at the top. Perhaps it is simply habit, but I do think having it right next to "staged for commit" items makes the most sense).

Show 7 quoted lines
> The above suggests me that (1) we would want to have the new "unmerged"
> section next to "updated" section, (2) we would want to have it later in
> the output rather than earlier, and (3) in the traditional output, people
> are used to see unmerged paths in "changed" section, so it would be easier
> for them to transition if "unmerged" section were near "changed" section.
> 
> That makes the ideal place between updated and changed, no?

Yes, I think that is fine, and makes more sense than where we have it now. I mainly wanted to argue against sticking it at the very bottom.

> [1] It might even make sense to omit other sections and show only
> "updated" and "unmerged" in this order when the index is unmerged, but
> that is a lot more drastic change for 1.7.0.

I think that is a really bad idea. The mental model of "git status" (versus individual diff or ls-files commands) is to see _everything_ going on in the repo. Showing a subset breaks that model and gives a false sense of what is actually happening.

I don't know that it would matter much most of the time anyway. If you have unmerged entries, you probably don't have any (or many) "changed but not updated" files, too (since you are not working on a new commit but rather a merge, they would have to be dirty state you are carrying permanently, but not related to the merge). If you do, you probably want to see them to be aware of what is going on.

You probably also don't have a lot of untracked files. If you have a few, you might want to be reminded of them to make sure they were not something you were preparing to help with a tricky merge. And if you are the sort of person who carries around a lot of untracked files, and for some reason you refuse to put them in your .gitignore, then you probably have status.untracked set to "no" already (or you should consider setting it), as they will be bugging you in other situations, as well.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 34 in “unmerged files listed in the beginning of git-status”
  1. bill lamSep 1, 2009
  2. Junio C HamanoSep 1, 2009
  3. Johannes SixtSep 1, 2009
  4. status: list unmerged files after staged filesJohannes Sixt, Sep 1, 2009
  5. Junio C HamanoSep 1, 2009
  6. status: list unmerged files lastJohannes Sixt, Sep 1, 2009
  7. Junio C HamanoSep 2, 2009
  8. bill lamSep 2, 2009
  9. Jeff KingSep 2, 2009
  10. Junio C HamanoSep 2, 2009
  11. Jeff KingSep 2, 2009
  12. Junio C HamanoSep 2, 2009
  13. Jeff KingSep 2, 2009
  14. David AguilarSep 2, 2009
  15. Jeff KingSep 2, 2009
  16. David AguilarSep 3, 2009
  17. Jeff KingSep 5, 2009
  18. Jeff KingSep 5, 2009
  19. 1/6 status: typo fix in usageJeff King, Sep 5, 2009
  20. 2/6 docs: note that status configuration affects only long formatJeff King, Sep 5, 2009
  21. Junio C HamanoSep 6, 2009
  22. 3/6 status: refactor short-mode printing to its own functionJeff King, Sep 5, 2009
  23. Junio C HamanoSep 6, 2009
  24. 4/6 status: refactor format option parsingJeff King, Sep 5, 2009
  25. 5/6 status: add --porcelain output formatJeff King, Sep 5, 2009
  26. 6/6 commit: support alternate status formatsJeff King, Sep 5, 2009
  27. Jeff KingSep 5, 2009
  28. Johannes SixtSep 2, 2009
  29. Mark BrownSep 2, 2009
  30. Jeff KingSep 2, 2009
  31. Mark BrownSep 2, 2009
  32. Jeff KingSep 5, 2009
  33. Mark BrownSep 5, 2009
  34. bill lamSep 2, 2009

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.