We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebe1af3 commit e1a3493Copy full SHA for e1a3493
1 file changed
bin/git-update-parent-branch
@@ -3,6 +3,7 @@
3
CURRENT_BRANCH="$(git current-branch)"
4
PARENT_BRANCH=""
5
COMMIT_MODE="multi-commit"
6
+UNTIL_COMMIT=""
7
COMMITS=""
8
9
while getopts ":-:" opt; do
@@ -30,6 +31,10 @@ else
30
31
COMMON_ANCESTOR="$(git merge-base "$CURRENT_BRANCH" "$PARENT_BRANCH")"
32
COMMITS="$(git rev-list "$CURRENT_BRANCH"..."$COMMON_ANCESTOR")"
33
fi
34
+
35
+ if [ "$2" != "" ]; then
36
+ UNTIL_COMMIT="$2"
37
+ fi
38
39
# TODO - What if we don't have commits?
40
@@ -55,6 +60,9 @@ else
55
60
COMMIT_ARRAY=($COMMIT_LIST)
56
61
for commit_id in "${COMMIT_ARRAY[@]}"
57
62
do
63
+ if [ "$UNTIL_COMMIT" == "$commit_id" ]; then
64
+ break
65
58
66
echo "----"
59
67
echo "Cherry Picking -> $commit_id"
68
git cherry-pick "$commit_id"
0 commit comments