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

Re: [PATCH] wt-status.c: set commitable bit if there is a meaningful merge.

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 22, 2018, 15:54 UTC
Message-ID
<xmqqzhxe5rcc.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<28440975.G22uFktzHy@thunderbird>
Stephen Smith <ischis2@cox.net> writes:
> On Tuesday, February 16, 2016 8:33:54 PM MST Junio C Hamano wrote:
Wow, that's quite an old discussion ;-)
Show 12 quoted lines
>> So if you do this:
>> 
>>     $ git reset --hard HEAD
>>     $ >a-new-file && git add a-new-file
>>     $ git commit --dry-run --short; echo $?
>> 
>> you'd get "No, there is nothing interesting to commit", which is
>> clearly bogus.
>
> I was about to start working on working on this and ran the test you suggested 
> back in 2016.   I don't get the error message from that time period.  I 
> believe that this was fixed.   
After these:
    $ git reset --hard HEAD
    $ >a-new-file && git add a-new-file
running 
    $ git commit --dry-run; echo $?
    $ git commit --dry-run --short; echo $?

tells me that "--short" still does not notice that there _is_ something to be committed, either with an ancient version like v2.10.5 or more modern versions of Git. The "long" version exits with 0, while "--short" one exists with 1.

So...?
Previous: Junio C HamanoNext: Stephen & Linda Smith
Message 14 of 16 in “Re: Bug report: 'git commit --dry-run' corner case: returns error ("nothing to commit") when all conflicts resolved to HEAD”
  1. Stephen & Linda SmithFeb 9, 2016
  2. wt-status.c: set commitable bit if there is a meaningful merge.Stephen P. Smith, Feb 16, 2016
  3. Philip OakleyFeb 16, 2016
  4. Junio C HamanoFeb 16, 2016
  5. Stephen & Linda SmithFeb 16, 2016
  6. Stephen & Linda SmithFeb 16, 2016
  7. Stephen & Linda SmithFeb 16, 2016
  8. Junio C HamanoFeb 17, 2016
  9. wt-status.c: set commitable bit if there is a meaningful merge.Stephen P. Smith, Feb 17, 2016
  10. Stephen & Linda SmithFeb 17, 2016
  11. Stephen & Linda SmithMay 10, 2016
  12. Stephen SmithAug 22, 2018
  13. Junio C HamanoAug 22, 2018
  14. Junio C HamanoAug 22, 2018
  15. Stephen & Linda SmithAug 23, 2018
  16. Stephen & Linda SmithFeb 12, 2016

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.