summaryrefslogtreecommitdiff
path: root/bin/gitify
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-07-02 19:57:30 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-07-02 19:57:30 -0400
commitf6fb39d53e854993915264b4613bc9f9de17a059 (patch)
tree86711675bf9f9be3cb57a6c69be0c2667d55df5d /bin/gitify
parentcbb56203466fb26ef1dbc4abf12c4bef787c7d93 (diff)
better logic for which branch should be the parent when creating a branch
Diffstat (limited to 'bin/gitify')
-rwxr-xr-xbin/gitify6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/gitify b/bin/gitify
index a05ae97..80f85af 100755
--- a/bin/gitify
+++ b/bin/gitify
@@ -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
}