projects
/
hvutilities.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfb50df
)
git-hg-sub-import: Ajout des subrepos à .gitignore
author
Hugo Villeneuve
<hugo@hugovil.com>
Fri, 28 Jun 2013 14:35:06 +0000
(10:35 -0400)
committer
Hugo Villeneuve
<hugo@hugovil.com>
Wed, 31 Jul 2013 18:05:11 +0000
(14:05 -0400)
scripts/git-hg-sub-import
patch
|
blob
|
history
diff --git
a/scripts/git-hg-sub-import
b/scripts/git-hg-sub-import
index
d5d947f
..
6d18dc3
100755
(executable)
--- a/
scripts/git-hg-sub-import
+++ b/
scripts/git-hg-sub-import
@@
-53,6
+53,11
@@
if [ ! -f .hgsub ]; then
exit 1
fi
+if [ ! -f .gitignore ]; then
+ # We do not want to track .gitignore itself
+ echo ".gitignore" > .gitignore
+fi
+
# Read lines from .hgsub
while read sub; do
# Remove CR (DOS)
@@
-94,6
+99,11
@@
while read sub; do
git checkout "branches/${branch}"
cd ..
fi
+
+ if ! grep -q "${dest}" .gitignore ; then
+ # Ignore subrepo in top-level git repository
+ echo "${dest}" >> .gitignore
+ fi
else
pushd "${dest}"
git pull