Skip to content

Commit

Permalink
allow -f --partial which works if partial zip is inside a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
prigaux committed Jun 23, 2020
1 parent 8ca6bb9 commit e766a80
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions git-unarchive
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ if [ -z "$partial" ]; then
# remove untracked files
git clean -fdx
fi
if [ -n "$partial" -a -n "$force" ]; then
rm -rf *
fi

case $archive in
*.zip|*.war)
Expand All @@ -88,6 +91,10 @@ if [ -d "$files" ]; then
rmdir $files
fi

if [ -n "$partial" -a -n "$force" ]; then
git ls-files -z | xargs -0 git checkout
fi

git add -A
git commit -q -m "$archive_commit_msg"
echo committed "$archive_commit_msg"
Expand Down

0 comments on commit e766a80

Please sign in to comment.