Re: [gentoo-portage-dev] Re: [PATCH] [sync] Run `git update-index --refresh` when doing shallow pulls

2016-10-31 Thread Michał Górny
On Mon, 31 Oct 2016 07:16:24 + (UTC)
Martin Vaeth  wrote:

> Michał Górny  wrote:
> > +   if quiet: # -q needs to go first
> > +   update_index_cmd.append('-q')  
> 
> The options -q --unmerged (which are implicitly passed by "git status")
> are not only to suppress verbosity:
> The git-update-index man page has to say for these options:
> 
> : the default behavior is to error out. This option makes
> : git update-index continue anyway.
> 
> and if I understood the git source code correctly, without
> these options git will indeed break some loops early in the
> "error" case, i.e. it will perhaps not do a full update of
> the index in the "error" case.

It's a 'best effort' attempt at making git not error out
in the following merge. If it doesn't work, the merge will print
the error.

-- 
Best regards,
Michał Górny



pgpWdkbJQrA03.pgp
Description: OpenPGP digital signature


[gentoo-portage-dev] Re: [PATCH] [sync] Run `git update-index --refresh` when doing shallow pulls

2016-10-31 Thread Martin Vaeth
Michał Górny  wrote:
> + if quiet: # -q needs to go first
> + update_index_cmd.append('-q')

The options -q --unmerged (which are implicitly passed by "git status")
are not only to suppress verbosity:
The git-update-index man page has to say for these options:

: the default behavior is to error out. This option makes
: git update-index continue anyway.

and if I understood the git source code correctly, without
these options git will indeed break some loops early in the
"error" case, i.e. it will perhaps not do a full update of
the index in the "error" case.