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

Re: git diff --name-status does not always list changed files

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 28, 2008, 22:51 UTC
Message-ID
<7v63w8hezn.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<bdca99240802281419o3fcea2e8u277d8e5e48131b6d@mail.gmail.com>
"Sebastian Schuberth" <sschuberth@gmail.com> writes:
Show 5 quoted lines
> Thanks, -FX works, though I do not understand why it did not with just
> -F. From what I understood, -F just makes "less" quit immediately
> (instead of waiting for the user to press "q") if the lines to display
> fit completely on screen. In no case it should display nothing if
> there actually is something to display.

My reading and understanding of less manual page, especially the part that talks about -X suggests that everything is working as it is meant to.

"git diff --name-status" displays something, less shows it, and it quits immediately (because you asked it to with -F). As part of its quitting, it clears the screen because you did not ask less not to do that by giving it an -X.

I am tempted to call it a bug in less, but I am a very nice person and I would not actually do so ;-). But it certainly feels like a misfeature between less and terminfo to me.

Previous: Sebastian Schuberth
Message 6 of 6 in “git diff --name-status does not always list changed files”
  1. Sebastian SchuberthFeb 28, 2008
  2. Junio C HamanoFeb 28, 2008
  3. Sebastian SchuberthFeb 28, 2008
  4. Junio C HamanoFeb 28, 2008
  5. Sebastian SchuberthFeb 28, 2008
  6. Junio C HamanoFeb 28, 2008

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.