summary refs log tree commit diff
path: root/git-p4.py
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-06-02 13:35:01 -0700
committerJunio C Hamano <gitster@pobox.com>2020-06-02 13:35:01 -0700
commit7a8fec908a40bd009803de1617c90684e932f878 (patch)
tree6d8d36eeaef8966a18b345dd778b5edc3a89c27f /git-p4.py
parent0739479c6a2b02992037d7e816663d6782bfcd49 (diff)
parent2dfdd705ffd8c6dd1ef75abdfb64e1a08ad35a26 (diff)
Merge branch 'bk/p4-prepare-p4-only-fix'
The "--prepare-p4-only" option is supposed to stop after replaying
one changeset, but kept going (by mistake?)

* bk/p4-prepare-p4-only-fix:
  git-p4.py: fix --prepare-p4-only error with multiple commits
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/git-p4.py b/git-p4.py
index d551efb0dd..ca79dc0900 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -2537,11 +2537,12 @@ class P4Submit(Command, P4UserMap):
                 ok = self.applyCommit(commit)
             if ok:
                 applied.append(commit)
-            else:
-                if self.prepare_p4_only and i < last:
-                    print("Processing only the first commit due to option" \
-                          " --prepare-p4-only")
+                if self.prepare_p4_only:
+                    if i < last:
+                        print("Processing only the first commit due to option" \
+                                " --prepare-p4-only")
                     break
+            else:
                 if i < last:
                     # prompt for what to do, or use the option/variable
                     if self.conflict_behavior == "ask":