mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-23 20:45:11 +00:00
Make patches work when using git submodules (#285)
This commit is contained in:
parent
4aa2a20f72
commit
9bb89067f2
1 changed files with 2 additions and 8 deletions
|
@ -10,15 +10,9 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure this is a git repository
|
|
||||||
if [ ! -d .git ]
|
|
||||||
then
|
|
||||||
echo 'Error: The current directory is not a Git repository.'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 'git diff' is stupid and doesn't show new untracked files, so we must add them first.
|
# 'git diff' is stupid and doesn't show new untracked files, so we must add them first.
|
||||||
git add .
|
# Also make sure this is a valid git repository, throw an error otherwise ( || exit 1 )
|
||||||
|
git add . || exit 1
|
||||||
# Generate the patch.
|
# Generate the patch.
|
||||||
git diff -p --staged > "$1"
|
git diff -p --staged > "$1"
|
||||||
# Undo the 'git add'.
|
# Undo the 'git add'.
|
||||||
|
|
Loading…
Reference in a new issue