`git var GIT_EDITOR` is better than ${VISUAL:-${EDITOR:-vi}} because
it takes into account all variables: GIT_EDITOR, VISUAL and EDITOR,
and falls back to the platform's default.
if [ "`cat \"$source_dir\"/.git/description`" = \
"Unnamed repository; edit this file 'description' to name the repository." ]
then
- "${VISUAL:-${EDITOR:-vi}}" "$source_dir"/.git/description .git/description
+ `git var GIT_EDITOR` "$source_dir"/.git/description .git/description
else
cp -p "$source_dir"/.git/description .git
fi &&
exec "`dirname \"$0\"`"/do-all \
'test "`cat $g/description`" = "Unnamed repository; edit this file '"'"description"'"' to name the repository." &&
- "${VISUAL:-${EDITOR:-vi}}" "$g"/description < /dev/tty'
+ `git var GIT_EDITOR` "$g"/description < /dev/tty'
if [ "`cat \"$source_dir\"/.git/description`" = \
"Unnamed repository; edit this file 'description' to name the repository." ]
then
- "${VISUAL:-${EDITOR:-vi}}" "$source_dir"/.git/description description
+ `git var GIT_EDITOR` "$source_dir"/.git/description description
else
cp -p "$source_dir"/.git/description . && chmod a+r description
fi &&
git gc --aggressive &&
git repack -a -d -f --depth=20 --window=250 &&
echo "Cloned from $url using git-svn" >.git/description &&
-exec "${VISUAL:-${EDITOR:-vi}}" .git/description
+exec `git var GIT_EDITOR` .git/description