Remember to dispose the clipboard after use
[egit.git] / tools / graft-old-history.sh
blob8164002caa1db7da7c1b0bd14a745fed09f133fb
1 #!/bin/sh
3 # Downloads and grafts in the old EGit project history, before
4 # the project moved to eclipse.org.
6 # It is recommended that you DO NOT use this script on your main
7 # work repository, or that if you do, you remove the graft before
8 # attempting to push content to a remote repository. Grafts cause
9 # the history traversal system to change behavior, which can break
10 # other algorithms that depend upon it.
13 URL=git://repo.or.cz/egit.git
14 PRE=a9578ba7361b66ab403c6605a1b87fb7b2f94c6e
15 POST=dfbdc456d8645fc0c310b5e15cf8d25d8ff7f84b
17 GIT_DIR=$(git rev-parse --git-dir) &&
18 grafts="$GIT_DIR/info/grafts" &&
20 if grep $PRE "$grafts" >/dev/null 2>/dev/null
21 then
22 echo 'Graft already installed; doing nothing.' >&2
23 else
24 git remote add old-egit "$URL" &&
25 git fetch old-egit &&
26 echo $POST $PRE >>"$GIT_DIR/info/grafts" &&
27 echo 'Graft installed.' >&2