Skip to content

Commit

Permalink
Problem: creating merge requests from branches
Browse files Browse the repository at this point in the history
When using `sit-mr` to create a merge request from a branch
it assumes `master` to be its fork point. However, this is
not always true.

Solution: use current branch as the forkpoint
  • Loading branch information
yrashk committed May 19, 2018
1 parent fb56f2b commit fad4df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/sit-mr
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ attach=${item}
tmpdir="$(mktemp -d)"
curdir=$(pwd)
editor=${EDITOR:-nano}
range=$(git merge-base --fork-point master "${branch}").."${branch}"
curbranch=$(git rev-parse --abbrev-ref HEAD)
range=$(git merge-base --fork-point ${curbranch} "${branch}").."${branch}"
sit=${SIT}

run() {
Expand Down

0 comments on commit fad4df2

Please sign in to comment.