mirror of
https://github.com/frej/fast-export.git
synced 2026-02-27 14:50:42 +01:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user