Merge branch 'ld/git-p4-updates'
authorJunio C Hamano <gitster@pobox.com>
Mon, 18 Jun 2018 17:18:41 +0000 (10:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Jun 2018 17:18:41 +0000 (10:18 -0700)
"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

1  2 
Documentation/git-p4.txt
git-p4.py
Simple merge
diff --cc git-p4.py
index 18bdd4228ba71e9b7c3d33a61d50f0da7fac84e7,dc00946f4600d81e461b5a97a4b855bf3ea97485..0354d4df5cadd5145245d755a8868608b849719f
+++ 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