summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-07-02 19:52:34 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-07-02 19:52:34 -0400
commitcbb56203466fb26ef1dbc4abf12c4bef787c7d93 (patch)
tree9b0880e6c03bac2a2dfbb77bdd9693a4f3fd11f6 /bin
parentd0e25535910ab36ac6029cbb6e89a1dab5dfbe8a (diff)
allow branches to be created without modifying contents
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gitify7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/gitify b/bin/gitify
index 55ddff8..a05ae97 100755
--- a/bin/gitify
+++ b/bin/gitify
@@ -41,8 +41,9 @@ main() {
dirpart="${dirpart//_/\/}"
branch=$dirpart
+ newbranch=true
git checkout PROGRAMS/CVTUTF
- git checkout -b "$branch" || true
+ git checkout -b "$branch" || newbranch=false
git checkout "$branch"
rm -f -- * .metadata.txt
@@ -60,7 +61,7 @@ main() {
cp "$listingdir/metadata.txt" .metadata.txt
fi
- if [[ -n "$(git status -s .)" ]]; then
+ if $newbranch || [[ -n "$(git status -s .)" ]]; then
if [[ "$time" = *99 ]]; then
msg="Synthesized listing: ${time} ${dirpart}"
time="${time%99}00"
@@ -72,7 +73,7 @@ main() {
git add .
export GIT_AUTHOR_DATE=$gitdate
export GIT_COMMITTER_DATE=$gitdate
- git commit -m "$msg"
+ git commit --allow-empty -m "$msg"
fi
done
}