aboutsummaryrefslogtreecommitdiff
path: root/git-filter-branch.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-06-21 18:05:30 +0100
committerJunio C Hamano <gitster@pobox.com>2007-06-22 23:20:44 -0700
commit55f22ff22e5ff6c21b50cf379ee946f9642fc3cb (patch)
treeef05d9f0d243f8149f880953628948e7f6935687 /git-filter-branch.sh
parent0f2890acd999e63892d0b5b401e70bdaefe3ba51 (diff)
downloadgit-55f22ff22e5ff6c21b50cf379ee946f9642fc3cb.tar.gz
git-55f22ff22e5ff6c21b50cf379ee946f9642fc3cb.tar.xz
filter-branch: add example to move everything into a subdirectory
This is based on Jeff King's example in 20070621130137.GB4487@coredump.intra.peff.net Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-filter-branch.sh')
-rw-r--r--[-rwxr-xr-x]git-filter-branch.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index bfd118cd3..8fa5ce646 100755..100644
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -178,6 +178,14 @@
#
# git-filter-branch ... new-H C..H --not D
# git-filter-branch ... new-H D..H --not C
+#
+# To move the whole tree into a subdirectory, or remove it from there:
+#
+# git-filter-branch --index-filter \
+# 'git-ls-files -s | sed "s-\t-&newsubdir/-" |
+# GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
+# git-update-index --index-info &&
+# mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' directorymoved
# Testsuite: TODO