Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2009-09-30 01:22:48 +0000
committerShawn O. Pearce2009-09-30 01:22:48 +0000
commit025d26216af17edb60c40e2046d30d4d9cc6571c (patch)
tree09df1aa28819f0db909a7815f100074e2f0e23ba /tools/graft-old-history.sh
parentdfbdc456d8645fc0c310b5e15cf8d25d8ff7f84b (diff)
downloadegit-025d26216af17edb60c40e2046d30d4d9cc6571c.tar.gz
egit-025d26216af17edb60c40e2046d30d4d9cc6571c.tar.xz
egit-025d26216af17edb60c40e2046d30d4d9cc6571c.zip
Utility to graft old EGit history onto repository
This script can be executed by a developer to download and graft on the old EGit history, from before we moved the project to the eclipse.org namespace and the Eclipse Foundation servers. Executing this script is only necessary if you need to run log or blame past the migration boundary, and isn't always recommended when it comes to pushing objects to a remote server. As mentioned in the script, it is best to use a specialized repository with this graft, not your main work repository. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'tools/graft-old-history.sh')
-rw-r--r--tools/graft-old-history.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/graft-old-history.sh b/tools/graft-old-history.sh
new file mode 100644
index 0000000000..8164002caa
--- /dev/null
+++ b/tools/graft-old-history.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Downloads and grafts in the old EGit project history, before
+# the project moved to eclipse.org.
+#
+# It is recommended that you DO NOT use this script on your main
+# work repository, or that if you do, you remove the graft before
+# attempting to push content to a remote repository. Grafts cause
+# the history traversal system to change behavior, which can break
+# other algorithms that depend upon it.
+
+
+URL=git://repo.or.cz/egit.git
+PRE=a9578ba7361b66ab403c6605a1b87fb7b2f94c6e
+POST=dfbdc456d8645fc0c310b5e15cf8d25d8ff7f84b
+
+GIT_DIR=$(git rev-parse --git-dir) &&
+grafts="$GIT_DIR/info/grafts" &&
+
+if grep $PRE "$grafts" >/dev/null 2>/dev/null
+then
+ echo 'Graft already installed; doing nothing.' >&2
+else
+ git remote add old-egit "$URL" &&
+ git fetch old-egit &&
+ echo $POST $PRE >>"$GIT_DIR/info/grafts" &&
+ echo 'Graft installed.' >&2
+fi

Back to the top