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

Re: [PATCH v5 6/6] status: add missing blank line after list of "other" files

From
Jeff King <peff@peff.net>
Date
Sep 6, 2013, 22:09 UTC
Message-ID
<20130906220902.GB13319@sigill.intra.peff.net>
In-Reply-To
<xmqq4n9xyepx.fsf@gitster.dls.corp.google.com>
On Fri, Sep 06, 2013 at 11:42:02AM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> > It is not like we want to add a blank line at the end of each
> > element; it is rather that we want to have a blank line between each
> > element, so that they can have a bit of breathing room between them.
> >
> > The output looks especially bad when there is nothing after the
> > 'untracked' list.
> 
> We might want to revisit this later, but I take the above back at
> least for now.

I agree with most of what you say here, and I started to look at a simple patch to give separator semantics. But there's an interesting case.

Given this:
Show 6 quoted lines
> If we have absolutely nothing, we get this:
> 
> 	$ git status
> 	On branch master
>         nothing to commit
> 	$
I think the lack of extra line delimiter looks fine.
But here:
Show 8 quoted lines
> And if we have something, we get this:
> 
> 	$ git status
> 	On branch master
> 	Changes to be committed:
> 	  (use "git reset HEAD <file>..." to unstage)
> 
> 	        new file:   foo

I think it looks kind of bad, because the branch specifier is is smooshed into the "to be committed" header.

So the logic is not just "separate with a newline". It's more like "separate big chunks with a newline, but if we only have small chunks, it's OK to stick them together".

-Peff
Previous: Junio C HamanoNext: Matthieu Moy
Message 10 of 12 in “Disable "git status" comment prefix”
  1. 0/6 Disable "git status" comment prefixMatthieu Moy, Sep 6, 2013
  2. 1/6 builtin/stripspace.c: fix broken indentationMatthieu Moy, Sep 6, 2013
  3. 2/6 wt-status: use argv_array APIMatthieu Moy, Sep 6, 2013
  4. 3/6 submodule summary: ignore --for-status optionMatthieu Moy, Sep 6, 2013
  5. 4/6 status: disable display of '#' comment prefix by defaultMatthieu Moy, Sep 6, 2013
  6. 5/6 tests: don't set status.displayCommentPrefix file-wideMatthieu Moy, Sep 6, 2013
  7. 6/6 status: add missing blank line after list of "other" filesMatthieu Moy, Sep 6, 2013
  8. Junio C HamanoSep 6, 2013
  9. Junio C HamanoSep 6, 2013
  10. Jeff KingSep 6, 2013
  11. Matthieu MoySep 6, 2013
  12. Junio C HamanoSep 6, 2013

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.