Skip to content

Commit ee6be85

Browse files
committed
Merge branch 'push-stash'
2 parents 4fc630c + 3024c23 commit ee6be85

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

git-fire

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ user_email() {
2323
}
2424

2525
new_branch() {
26-
echo "fire-$(current_branch)-$(user_email)-$(current_epoch)"
26+
echo "fire-${1:-$(current_branch)}-$(user_email)-$(current_epoch)"
2727
}
2828

2929
fire() {
30+
initial_branch="$(current_branch)"
31+
3032
git checkout -b "$(new_branch)"
3133

3234
# cd to git root directory
@@ -47,7 +49,7 @@ fire() {
4749
done
4850

4951
for sha in $(git rev-list -g stash); do
50-
git push origin "$sha":refs/heads/stash_"$sha"
52+
git push origin "$sha":refs/heads/"$(current_branch $initial_branch)"-stash-"$sha"
5153
done
5254

5355
printf "\n\nLeave building!\n"

0 commit comments

Comments
 (0)