diff options
-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 } |