diff options
author | Mike Frysinger <vapier@google.com> | 2020-03-22 12:14:01 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2020-03-23 00:26:26 +0000 |
commit | ea43176de0a46eadb12be814517532a13eec8b1d (patch) | |
tree | 32adc185cc21afba8462fa662e4bc1ccc1fcd827 /project.py | |
parent | 58ac1678e8438fd029a22365741fc57276eda404 (diff) | |
download | git-repo-ea43176de0a46eadb12be814517532a13eec8b1d.tar.gz |
download: support --ff when cherry-picking
The git cherry-pick already supports this, so plumb the existing repo
option down. Otherwise it's confusing when people use -c --ff and it
doesn't use that behavior.
Change-Id: Id68932ffa09204bb30b92a21aff185c00394a520
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/259852
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2681,8 +2681,10 @@ class Project(object): | |||
2681 | if self._allrefs: | 2681 | if self._allrefs: |
2682 | raise GitError('%s checkout %s ' % (self.name, rev)) | 2682 | raise GitError('%s checkout %s ' % (self.name, rev)) |
2683 | 2683 | ||
2684 | def _CherryPick(self, rev): | 2684 | def _CherryPick(self, rev, ffonly=False): |
2685 | cmd = ['cherry-pick'] | 2685 | cmd = ['cherry-pick'] |
2686 | if ffonly: | ||
2687 | cmd.append('--ff') | ||
2686 | cmd.append(rev) | 2688 | cmd.append(rev) |
2687 | cmd.append('--') | 2689 | cmd.append('--') |
2688 | if GitCommand(self, cmd).Wait() != 0: | 2690 | if GitCommand(self, cmd).Wait() != 0: |