diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-07-02 19:57:30 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-07-02 19:57:30 -0400 |
commit | f6fb39d53e854993915264b4613bc9f9de17a059 (patch) | |
tree | 86711675bf9f9be3cb57a6c69be0c2667d55df5d /bin | |
parent | cbb56203466fb26ef1dbc4abf12c4bef787c7d93 (diff) |
better logic for which branch should be the parent when creating a branch
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/gitify | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -32,6 +32,7 @@ main() { cd "$1" git init echo 'ref: refs/heads/PROGRAMS/CVTUTF' > .git/HEAD + lastbranch=PROGRAMS/CVTUTF git commit --allow-empty -m 'initial commit' for snapshot in "$top"/dat/pools/snaps/*; do @@ -42,7 +43,7 @@ main() { branch=$dirpart newbranch=true - git checkout PROGRAMS/CVTUTF + git checkout "$lastbranch" git checkout -b "$branch" || newbranch=false git checkout "$branch" @@ -74,6 +75,9 @@ main() { export GIT_AUTHOR_DATE=$gitdate export GIT_COMMITTER_DATE=$gitdate git commit --allow-empty -m "$msg" + if [[ "$branch" != *.OLD ]]; then + lastbranch="$branch" + fi fi done } |