Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] sync: always pass -q --unmerged to git-update-index
Date: Thu, 03 Nov 2016 20:00:02
Message-Id: 20161103125955.6ea346e4.dolsen@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] sync: always pass -q --unmerged to git-update-index by Zac Medico
1 On Thu, 3 Nov 2016 12:29:12 -0700
2 Zac Medico <zmedico@g.o> wrote:
3
4 > On 11/03/2016 12:22 PM, Mike Gilbert wrote:
5 > > Passing -q --unmerged prevents update-index from erroring out when
6 > > local file changes are present.
7 > >
8 > > From git-update-index(1):
9 > >
10 > > -q
11 > > Quiet. If --refresh finds that the index needs an
12 > > update, the default behavior is to error out. This option makes git
13 > > update-index continue anyway.
14 > >
15 > > --unmerged
16 > > If --refresh finds unmerged changes in the index, the
17 > > default behavior is to error out. This option makes git update-index
18 > > continue anyway.
19 > >
20 > > X-Gentoo-Bug-URL: https://bugs.gentoo.org/552814#c58
21 > > ---
22 > > pym/portage/sync/modules/git/git.py | 5 +----
23 > > 1 file changed, 1 insertion(+), 4 deletions(-)
24 > >
25 > > diff --git a/pym/portage/sync/modules/git/git.py
26 > > b/pym/portage/sync/modules/git/git.py index dc94ec9..f288733 100644
27 > > --- a/pym/portage/sync/modules/git/git.py
28 > > +++ b/pym/portage/sync/modules/git/git.py
29 > > @@ -118,10 +118,7 @@ class GitSync(NewBase):
30 > > if exitcode == os.EX_OK and self.repo.sync_depth
31 > > is not None: # update-index --refresh is needed on some filesystems
32 > > # (e.g. with overlayfs on squashfs)
33 > > - update_index_cmd = [self.bin_command,
34 > > 'update-index']
35 > > - if quiet: # -q needs to go first
36 > > - update_index_cmd.append('-q')
37 > > - update_index_cmd.append('--refresh')
38 > > + update_index_cmd = [self.bin_command,
39 > > 'update-index', '-q', '--unmerged', '--refresh']
40 > > exitcode =
41 > > subprocess.call(update_index_cmd,
42 > > cwd=portage._unicode_encode(self.repo.location))
43 >
44 > LGTM.
45
46 +1 LGTM too
47
48 --
49 Brian Dolbec <dolsen>

Replies