diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-07-02 19:52:34 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-07-02 19:52:34 -0400 |
commit | cbb56203466fb26ef1dbc4abf12c4bef787c7d93 (patch) | |
tree | 9b0880e6c03bac2a2dfbb77bdd9693a4f3fd11f6 /bin/gitify | |
parent | d0e25535910ab36ac6029cbb6e89a1dab5dfbe8a (diff) |
allow branches to be created without modifying contents
Diffstat (limited to 'bin/gitify')
-rwxr-xr-x | bin/gitify | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 } |