mirror of
https://github.com/frej/fast-export.git
synced 2026-05-07 08:36:55 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb05ce5b7b | ||
|
|
01d71a2d3f | ||
|
|
1d0f6cb7ca |
@@ -49,9 +49,23 @@ case "$1" in
|
|||||||
exit 0
|
exit 0
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cd $(git rev-parse --show-toplevel) \
|
IS_BARE=$(git rev-parse --is-bare-repository) \
|
||||||
|| (echo "Could not find git repo" ; exit 1)
|
|| (echo "Could not find git repo" ; exit 1)
|
||||||
GIT_DIR=$(git rev-parse --git-dir) || exit 1
|
if test "z$IS_BARE" != ztrue; then
|
||||||
|
# This is not a bare repo, cd to the toplevel
|
||||||
|
TOPLEVEL=$(git rev-parse --show-toplevel) \
|
||||||
|
|| (echo "Could not find git repo toplevel" ; exit 1)
|
||||||
|
cd $TOPLEVEL || exit 1
|
||||||
|
fi
|
||||||
|
GIT_DIR=$(git rev-parse --git-dir) || (echo "Could not find git repo" ; exit 1)
|
||||||
|
|
||||||
|
|
||||||
|
IGNORECASEWARN=""
|
||||||
|
IGNORECASE=`git config core.ignoreCase`
|
||||||
|
if [ "true" = "$IGNORECASE" ]; then
|
||||||
|
IGNORECASEWARN="true"
|
||||||
|
fi;
|
||||||
|
|
||||||
|
|
||||||
while case "$#" in 0) break ;; esac
|
while case "$#" in 0) break ;; esac
|
||||||
do
|
do
|
||||||
@@ -66,6 +80,7 @@ do
|
|||||||
--force)
|
--force)
|
||||||
# pass --force to git-fast-import and hg-fast-export.py
|
# pass --force to git-fast-import and hg-fast-export.py
|
||||||
GFI_OPTS="$GFI_OPTS --force"
|
GFI_OPTS="$GFI_OPTS --force"
|
||||||
|
IGNORECASEWARN="";
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
@@ -79,6 +94,22 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ ! -z "$IGNORECASEWARN" ]; then
|
||||||
|
echo "Error: The option core.ignoreCase is set to true in the git"
|
||||||
|
echo "repository. This will produce empty changesets for renames that just"
|
||||||
|
echo "change the case of the file name."
|
||||||
|
echo "Use --force to skip this check or change the option with"
|
||||||
|
echo "git config core.ignoreCase false"
|
||||||
|
exit 1
|
||||||
|
fi;
|
||||||
|
|
||||||
|
# Make a backup copy of each state file
|
||||||
|
for i in $SFX_STATE $SFX_MARKS $SFX_MAPPING $SFX_HEADS ; do
|
||||||
|
if [ -f "$GIT_DIR/$PFX-$i" ] ; then
|
||||||
|
cp "$GIT_DIR/$PFX-$i" "$GIT_DIR/$PFX-$i~"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# for convenience: get default repo from state file
|
# for convenience: get default repo from state file
|
||||||
if [ x"$REPO" = x -a -f "$GIT_DIR/$PFX-$SFX_STATE" ] ; then
|
if [ x"$REPO" = x -a -f "$GIT_DIR/$PFX-$SFX_STATE" ] ; then
|
||||||
REPO="`grep '^:repo ' "$GIT_DIR/$PFX-$SFX_STATE" | cut -d ' ' -f 2`"
|
REPO="`grep '^:repo ' "$GIT_DIR/$PFX-$SFX_STATE" | cut -d ' ' -f 2`"
|
||||||
|
|||||||
10
hg-reset.sh
10
hg-reset.sh
@@ -24,9 +24,15 @@ Options:
|
|||||||
-r Mercurial repository to use
|
-r Mercurial repository to use
|
||||||
"
|
"
|
||||||
|
|
||||||
cd $(git rev-parse --show-toplevel) \
|
IS_BARE=$(git rev-parse --is-bare-repository) \
|
||||||
|| (echo "Could not find git repo" ; exit 1)
|
|| (echo "Could not find git repo" ; exit 1)
|
||||||
GIT_DIR=$(git rev-parse --git-dir) || exit 1
|
if test "z$IS_BARE" != ztrue; then
|
||||||
|
# This is not a bare repo, cd to the toplevel
|
||||||
|
TOPLEVEL=$(git rev-parse --show-toplevel) \
|
||||||
|
|| (echo "Could not find git repo toplevel" ; exit 1)
|
||||||
|
cd $TOPLEVEL || exit 1
|
||||||
|
fi
|
||||||
|
GIT_DIR=$(git rev-parse --git-dir) || (echo "Could not find git repo" ; exit 1)
|
||||||
|
|
||||||
while case "$#" in 0) break ;; esac
|
while case "$#" in 0) break ;; esac
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user