projects
/
xonotic
/
xonotic.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5fc7e50
)
import-pk3: force reading of .gitignore from index
author
Jānis Rūcis <parasti@gmail.com>
Mon, 16 Aug 2010 14:33:53 +0000
(17:33 +0300)
committer
Jānis Rūcis <parasti@gmail.com>
Mon, 16 Aug 2010 14:33:53 +0000
(17:33 +0300)
misc/tools/git-import-pk3
patch
|
blob
|
history
diff --git
a/misc/tools/git-import-pk3
b/misc/tools/git-import-pk3
index f9680ac7b36dfb8887aa2189da706872387bb4ae..b6d048261b32c0c84a7da9bcd29481bbb7e0f16b 100755
(executable)
--- a/
misc/tools/git-import-pk3
+++ b/
misc/tools/git-import-pk3
@@
-109,9
+109,15
@@
die "couldn't initialize index"
[ -z "$(git diff-files --diff-filter=M)" ] ||
die "found changes to files in master"
[ -z "$(git diff-files --diff-filter=M)" ] ||
die "found changes to files in master"
+# Force reading of .gitignore files from cache, not the work tree
+git ls-files --cached -z |
+grep -z '\.gitignore$' |
+git update-index --skip-worktree -z --stdin ||
+die "couldn't set up exclude patterns from index"
+
# Add untracked files; to filter out generated files such as BSP, add
# Add untracked files; to filter out generated files such as BSP, add
-# them to .gitignore and push, --exclude-standard
should take care of
-# the rest
+# them to .gitignore and push, --exclude-standard
(and the above hack)
+# t
akes care of t
he rest
git ls-files --exclude-standard -o -z |
git update-index --add -z --stdin ||
die "couldn't add files to index"
git ls-files --exclude-standard -o -z |
git update-index --add -z --stdin ||
die "couldn't add files to index"