1 |
commit: dac12abb20592b098163c87572f6e04416ef3996 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 8 22:15:09 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 8 22:15:09 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=dac12abb |
7 |
|
8 |
GitSync: fix verification of remote branch |
9 |
|
10 |
Fixes: 3cd8cf93abb6 ("GitSync: abort checkout for signature problem (bug 660372)") |
11 |
|
12 |
pym/portage/sync/modules/git/git.py | 4 ++-- |
13 |
1 file changed, 2 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/pym/portage/sync/modules/git/git.py b/pym/portage/sync/modules/git/git.py |
16 |
index 85a44289a..97c4c1de6 100644 |
17 |
--- a/pym/portage/sync/modules/git/git.py |
18 |
+++ b/pym/portage/sync/modules/git/git.py |
19 |
@@ -155,7 +155,7 @@ class GitSync(NewBase): |
20 |
writemsg_level(msg + "\n", level=logging.ERROR, noiselevel=-1) |
21 |
return (exitcode, False) |
22 |
|
23 |
- if not self.verify_head(revision='refs/remotes/%s^..' % remote_branch): |
24 |
+ if not self.verify_head(revision='refs/remotes/%s' % remote_branch): |
25 |
return (1, False) |
26 |
|
27 |
merge_cmd = [self.bin_command, 'merge', 'refs/remotes/%s' % remote_branch] |
28 |
@@ -209,7 +209,7 @@ class GitSync(NewBase): |
29 |
env = os.environ.copy() |
30 |
env['GNUPGHOME'] = openpgp_env.home |
31 |
|
32 |
- rev_cmd = [self.bin_command, "log", "--pretty=format:%G?", revision] |
33 |
+ rev_cmd = [self.bin_command, "log", "-n1", "--pretty=format:%G?", revision] |
34 |
try: |
35 |
status = (portage._unicode_decode( |
36 |
subprocess.check_output(rev_cmd, |