Jon Seymour <jon.seym...@gmail.com> writes:

> On Fri, Apr 23, 2010 at 7:48 AM, Adam Brewster <adambrews...@gmail.com> wrote:
>
>> Consider
>>
>> $ echo -e '#!/bin/bash\nif git diff-tree --quiet HEAD; then git commit
>> -a; else git commit; fi' > `git --exec-path`/git-ci
>> $ chmod 555 `git --exec-path`/git-ci
>>
>> Adam
>
> Perhaps I am missing something, but I would have thought git
> diff-files --quiet would be more useful in this context...
>
> jon.

% git diff-files; git diff-files --quiet; echo $?
:100644 100644 09f06ca1503da57f89331ddc44f0a3c60313c531 
0000000000000000000000000000000000000000 M      debian/changelog
:100644 100644 978b107709d1e45b5240a86960587d2a61d8afe6 
0000000000000000000000000000000000000000 M      debian/control
1

% git add debian/control

% git diff-files; git diff-files --quiet; echo $?
:100644 100644 09f06ca1503da57f89331ddc44f0a3c60313c531 
0000000000000000000000000000000000000000 M      debian/changelog
1

% git add debian/changelog 

% git diff-files; echo $? 
0

Doesn't tell me if there is an index prepared alraedy or not. Only tells
me if there are changes that are not in the index.

MfG
        Goswin



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to