3 # This hook is called with the following parameters:
5 # $1 -- the upstream the series was forked from.
6 # $2 -- the branch being rebased (or empty when rebasing the current branch).
8 # Dig out and save the name of the branch being rebased for commit-msg hook.
9 # There the branch name is used to add gerrit Change-Id footers to branches
10 # matching .*tizen.* and remove from any other branches.
12 branch=$(git branch -l | grep '^\*' | cut -d ' ' -f 2)
13 gittop=$(while [ ! -d .git -a $(pwd) != "/" ]; do cd ..; done; echo $(pwd))
17 echo "-" > $gittop/.rebase-branch-name
20 echo "$branch" > $gittop/.rebase-branch-name
21 echo "Saved branch name \"$branch\" for commit-msg hook..."