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