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

Re: finding if a commit is needed

From
Geoff Russell <geoffrey.russell@gmail.com>
Date
Jul 30, 2010, 10:16 UTC
Message-ID
<AANLkTinvLVJbnZ4ZnrszV1taDUS3B-0aWYoD1Q5UyFtA@mail.gmail.com>
In-Reply-To
<20100729000647.GB29156@dert.cs.uchicago.edu>
On Thu, Jul 29, 2010 at 9:36 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 8 quoted lines
> Geoff Russell wrote:
>
>> Is there something which can test whether a commit is needed?
>>
>> I define "needed" as meaning when git commit -a would make a non-identical
>> commit.
>
> Maybe "git diff --exit-code HEAD"?
Thanks ... "git diff --quiet || echo differences"

Cheers, Geoff.

>
> Regards,
> Jonathan
>
-- 
6 Fifth Ave,
St Morris, S.A. 5068
Australia
Ph: 041 8805 184 / 08 8332 5069
http://perfidy.com.au
Previous: Jonathan Nieder
Message 3 of 3 in “finding if a commit is needed”
  1. Geoff RussellJul 28, 2010
  2. Jonathan NiederJul 29, 2010
  3. Geoff RussellJul 30, 2010

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.