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

Re: [PATCH 3/3] make commit --verbose work with --no-status

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Feb 24, 2014, 04:24 UTC
Message-ID
<CALUzUxrO-=a5u-NpPVcQdnc2sp9dq3St0PZm=QOWr7oMWDz-Jw@mail.gmail.com>
In-Reply-To
<20140222083110.GE1576@sigill.intra.peff.net>
On Sat, Feb 22, 2014 at 4:31 PM, Jeff King <peff@peff.net> wrote:
Show 19 quoted lines
> On Sat, Feb 22, 2014 at 03:09:22AM +0800, Tay Ray Chuan wrote:
>
>> @@ -1141,7 +1146,12 @@ static int parse_and_validate_options(int argc, const char *argv[],
>>       if (all && argc > 0)
>>               die(_("Paths with -a does not make sense."));
>>
>> -     if (status_format != STATUS_FORMAT_DEFAULT)
>> +     if (verbose && !include_status) {
>> +             include_status = 1;
>> +             status_format = STATUS_FORMAT_NONE;
>> +     }
>> +
>> +     if (status_format != STATUS_FORMAT_DEFAULT && !verbose)
>>               dry_run = 1;
>
> What happens here when there is an alternate status format _and_
> --verbose is used? If I say "git commit --porcelain" it should imply
> --dry-run. But "git commit --porcelain --verbose" no longer does so
> after your patch.
I should have just left the --dry-run inference alone, like this.
-->8--
@@ -1141,7 +1146,12 @@ static int parse_and_validate_options
        if (all && argc > 0)
                die(_("Paths with -a does not make sense."));

-       if (status_format != STATUS_FORMAT_DEFAULT)
+       if (verbose && !include_status) {
+               include_status = 1;
+               status_format = STATUS_FORMAT_NONE;
+       } else if (status_format != STATUS_FORMAT_DEFAULT)
                dry_run = 1;

        return argc;
Previous: Jeff KingNext: Jeff King
Message 6 of 8 in “make commit --verbose work with --no-status”
  1. 0/3 make commit --verbose work with --no-statusTay Ray Chuan, Feb 21, 2014
  2. 1/3 rename STATUS_FORMAT_NONE to STATUS_FORMAT_DEFAULTTay Ray Chuan, Feb 21, 2014
  3. 2/3 extract setting of wt_status.commitable flag out of wt_status_print_updated()Tay Ray Chuan, Feb 21, 2014
  4. 3/3 make commit --verbose work with --no-statusTay Ray Chuan, Feb 21, 2014
  5. Jeff KingFeb 22, 2014
  6. Tay Ray ChuanFeb 24, 2014
  7. Jeff KingFeb 24, 2014
  8. Jeff KingFeb 22, 2014

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.