Gentoo Archives: gentoo-commits

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