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

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 23, 2017, 18:03 UTC
Message-ID
<xmqq8tnveuqv.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAMMLpeRtzYM3a639DcNbhqAmz3dNkRebvQps-gusEKx+eQqPgQ@mail.gmail.com>
Alex Henrie <alexhenrie24@gmail.com> writes:
> Yes, that makes sense. I assume that when you talk about 'next', you
> mean 'master'?

No, I do mean 'next'. See "A note from the maintainer" post that are sent to the list every once in a while (i.e. after a new release is tagged) for the project structure.

    https://public-inbox.org/git/xmqqy3vztypi.fsf@gitster.mtv.corp.google.com/
> If we want to use `git -p log` in a test, we'll have to change the
> behavior of pager_in_use(). Alternatively, we could use
> `GIT_PAGER_IN_USE=1 git log` instead.

Testing "git -p" is not the goal; testing that decorate defaults to auto during an interactive session is. We could run tests under pty like t7006 does using lib-terminal.sh if we really want to emulate an interactive session.

Exporting GIT_PAGER_IN_USE may be sufficient for the purpose of convincing the command to be in an interactive session for this test, even though it feels a bit too brittle to depend on the internal implementation detail.

Thanks.
Previous: Alex HenrieNext: Alex Henrie
Message 9 of 13 in “log: if --decorate is not given, default to --decorate=auto”
  1. log: if --decorate is not given, default to --decorate=autoAlex Henrie, Mar 21, 2017
  2. Junio C HamanoMar 21, 2017
  3. Junio C HamanoMar 21, 2017
  4. Alex HenrieMar 22, 2017
  5. Junio C HamanoMar 22, 2017
  6. Alex HenrieMar 23, 2017
  7. Junio C HamanoMar 23, 2017
  8. Alex HenrieMar 23, 2017
  9. Junio C HamanoMar 23, 2017
  10. Alex HenrieMar 24, 2017
  11. Jeff KingMar 24, 2017
  12. pager_in_use: use git_env_bool()Jeff King, Mar 24, 2017
  13. Junio C HamanoMar 24, 2017

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.