Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Commit

Permalink
Determine rebase from global setting, if it is not configured for branch
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlins committed May 21, 2017
1 parent 586c093 commit 5d71e17
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/io/bit3/mgpm/worker/Worker.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ private void determineLocalBranchesAndUpstreams() throws GitProcessException {

try {
rebase = git("config", "--local", "--get", String.format("branch.%s.rebase", branchName)).toLowerCase();

if (StringUtils.isBlank(rebase)) {
// not defined for this branch, use global setting instead
rebase = git("config", "--get", "pull.rebase");
}
} catch (GitProcessException e) {
// exception means, there is no remote configured
}
Expand Down

0 comments on commit 5d71e17

Please sign in to comment.