1 Commits

Author SHA1 Message Date
Frej Drejhammar
6cf9397bd6 Do not rely on git internals, support Git >= 2.10
Fast-export has traditionally sourced the internal git-sh-setup from
Git, following the release of Git 2.10 this no longer works. Fast-export
only uses the functionality of git-sh-setup for two things: cd:ing to
the git repo dir and setting up the GIT_REPO environment variable. To
future-proof fast-export start doing what we need by hand in
fast-export.

Acknowledgments to Louis Sautier who reported the problem and tested the
fix.
2016-09-14 14:15:11 +02:00
2 changed files with 7 additions and 4 deletions

View File

@@ -48,8 +48,10 @@ case "$1" in
echo "$LONG_USAGE"
exit 0
esac
. "$(git --exec-path)/git-sh-setup"
cd_to_toplevel
cd $(git rev-parse --show-toplevel) \
|| (echo "Could not find git repo" ; exit 1)
GIT_DIR=$(git rev-parse --git-dir) || exit 1
while case "$#" in 0) break ;; esac
do

View File

@@ -24,8 +24,9 @@ Options:
-r Mercurial repository to use
"
. "$(git --exec-path)/git-sh-setup"
cd_to_toplevel
cd $(git rev-parse --show-toplevel) \
|| (echo "Could not find git repo" ; exit 1)
GIT_DIR=$(git rev-parse --git-dir) || exit 1
while case "$#" in 0) break ;; esac
do