From: Junio C Hamano Date: Mon, 18 Jun 2018 17:18:41 +0000 (-0700) Subject: Merge branch 'ld/git-p4-updates' X-Git-Tag: v2.18.0~21 X-Git-Url: http://git.bitbasher.net/?a=commitdiff_plain;h=e638899470621738f32ef75dc0a092f6475a4a6e;p=git.git Merge branch 'ld/git-p4-updates' "git p4" updates. * ld/git-p4-updates: git-p4: auto-size the block git-p4: narrow the scope of exceptions caught when parsing an int git-p4: raise exceptions from p4CmdList based on error from p4 server git-p4: better error reporting when p4 fails git-p4: add option to disable syncing of p4/master with p4 git-p4: disable-rebase: allow setting this via configuration git-p4: add options --commit and --disable-rebase --- e638899470621738f32ef75dc0a092f6475a4a6e diff --cc git-p4.py index 18bdd4228b,dc00946f46..0354d4df5c --- a/git-p4.py +++ b/git-p4.py @@@ -2110,13 -2215,22 +2226,22 @@@ class P4Submit(Command, P4UserMap) commits = [] if self.master: - commitish = self.master + committish = self.master else: - commitish = 'HEAD' + committish = 'HEAD' - for line in read_pipe_lines(["git", "rev-list", "--no-merges", "%s..%s" % (self.origin, committish)]): - commits.append(line.strip()) - commits.reverse() + if self.commit != "": + if self.commit.find("..") != -1: + limits_ish = self.commit.split("..") + for line in read_pipe_lines(["git", "rev-list", "--no-merges", "%s..%s" % (limits_ish[0], limits_ish[1])]): + commits.append(line.strip()) + commits.reverse() + else: + commits.append(self.commit) + else: - for line in read_pipe_lines(["git", "rev-list", "--no-merges", "%s..%s" % (self.origin, commitish)]): ++ for line in read_pipe_lines(["git", "rev-list", "--no-merges", "%s..%s" % (self.origin, committish)]): + commits.append(line.strip()) + commits.reverse() if self.preserveUser or gitConfigBool("git-p4.skipUserNameCheck"): self.checkAuthorship = False