Skip to content

Commit

Permalink
Merge branch 'bk/p4-prepare-p4-only-fix'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gitster committed Jun 2, 2020
2 parents 0739479 + 2dfdd70 commit 7a8fec9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions git-p4.py
Expand Up @@ -2537,11 +2537,12 @@ def run(self, args):
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":
Expand Down

0 comments on commit 7a8fec9

Please sign in to comment.