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

Re: [PATCH v4 0/5] Disable "git status" comment prefix

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 5, 2013, 19:13 UTC
Message-ID
<xmqqhadzhyjb.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1378374618-31439-1-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 17 quoted lines
> Compared to v2, this changes essentially:
>
> * The prefix is actually disabled by default in this version. As a
>   consequence, the option is renamed to status.oldStyle.
>
> * Since this is the default, the tests are updated to test the new
>   defaults. In a first patch, I'm setting status.oldStyle=true in test
>   files that require it (to keep the patch short), and the last patch
>   actually updates the test expected results. This was actually useful
>   as I did find (and fix) a few bugs updating the tests:
>
>   - the --columns option was still showing the comment prefix
>
>   - "git commit --dry-run" and failed "git commit" were still
>     displaying comments to stdout.
>
> * The --for-status option is kept as a no-op.
Much nicer.  Will replace and queue.

One caveat, though. The name "oldStyle" will become problematic, when we want to remove some wart in the output format long after this "no comment prefix by default" series lands. Some people may expect setting oldStyle=true would give output from 1.8.4 era, while some others would expect that it would give output from 1.8.5 era that does not have comment prefix but still has that wart we will remove down the line.

It is a common mistake to make to think that one is making the final change to the code and the result of that final change will stay the latest forever. I am sure I've done that for a few times and later regretted them.

Previous: Matthieu MoyNext: Matthieu Moy
Message 8 of 17 in “Disable "git status" comment prefix”
  1. 0/5 Disable "git status" comment prefixMatthieu Moy, Sep 5, 2013
  2. 1/5 builtin/stripspace.c: fix broken indentationMatthieu Moy, Sep 5, 2013
  3. 2/5 wt-status: use argv_array APIMatthieu Moy, Sep 5, 2013
  4. 3/5 submodule summary: ignore --for-status optionMatthieu Moy, Sep 5, 2013
  5. 4/5 status: disable display of '#' comment prefix by defaultMatthieu Moy, Sep 5, 2013
  6. 5/5 tests: don't set status.oldStyle file-wideMatthieu Moy, Sep 5, 2013
  7. Matthieu MoySep 5, 2013
  8. Junio C HamanoSep 5, 2013
  9. Matthieu MoySep 5, 2013
  10. Junio C HamanoSep 5, 2013
  11. Jeff KingSep 5, 2013
  12. Matthieu MoySep 6, 2013
  13. Jonathan NiederSep 6, 2013
  14. Matthieu MoySep 6, 2013
  15. Junio C HamanoSep 6, 2013
  16. Matthieu MoySep 6, 2013
  17. Jeff KingSep 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.