# git-update-index -q

2 messages from 2008-09-02 to 2008-09-02. Participants: Karl Chen, Junio C Hamano.
Thread: https://gitlist.dev/t/15334

## Karl Chen, 2008-09-02 17:51

Subject: git-update-index -q
Message-ID: <quack.20080902T1051.lth1w02mo5l@roar.cs.berkeley.edu>
URL: https://gitlist.dev/e/quack.20080902T1051.lth1w02mo5l%40roar.cs.berkeley.edu

```

The git-update-index man page entry for -q says:

       -q
           Quiet. If --refresh finds that the index needs an
           update, the default behavior is to error out. This
           option makes git-update-index continue anyway.

Can someone explain this to me?  As far as I can tell,
git-update-index without -q does not error out after the first
update.

```

## Junio C Hamano, 2008-09-02 20:23

Subject: Re: git-update-index -q
Message-ID: <7vsksijo00.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vsksijo00.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <quack.20080902T1051.lth1w02mo5l@roar.cs.berkeley.edu>

```
Karl Chen <quarl@cs.berkeley.edu> writes:

> The git-update-index man page entry for -q says:
>
>        -q
>            Quiet. If --refresh finds that the index needs an
>            update, the default behavior is to error out. This
>            option makes git-update-index continue anyway.
>
> Can someone explain this to me?  As far as I can tell,
> git-update-index without -q does not error out after the first
> update.

: gitster j; git init
Initialized empty Git repository in /var/tmp/j/.git/
: gitster j/master; >afile; git update-index --add afile
: gitster j/master; echo a >afile
: gitster j/master; git update-index --refresh; echo $?
afile: needs update
1
: gitster j/master; git update-index -q --refresh; echo $?
0
: gitster j/master; exit

```
