summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e15b484)
raw | patch | inline | side by side (parent: e15b484)
author | Theodore Ts'o <tytso@mit.edu> | |
Tue, 27 Mar 2007 16:12:22 +0000 (12:12 -0400) | ||
committer | Theodore Ts'o <tytso@mit.edu> | |
Thu, 29 Mar 2007 16:22:44 +0000 (12:22 -0400) |
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
git-mergetool.sh | patch | blob | history |
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 7942fd0b6490760b09248b961b38adb89ede1adb..340182335095dcf3a5201dfffcd3756498950352 100755 (executable)
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
branch="$2"
file="$3"
- echo -n " "
+ printf " "
if test -z "$mode"; then
- echo -n "'$path' was deleted"
+ printf "'%s' was deleted" "$path"
elif is_symlink "$mode" ; then
- echo -n "'$path' is a symlink containing '"
- cat "$file"
- echo -n "'"
+ printf "'%s' is a symlink containing '%s'" "$path" "$file"
else
if base_present; then
- echo -n "'$path' was created"
+ printf "'%s' was created" "$path"
else
- echo -n "'$path' was modified"
+ printf "'%s' was modified" "$path"
fi
fi
echo " in the $branch branch"
resolve_symlink_merge () {
while /bin/true; do
- echo -n "Use (r)emote or (l)ocal, or (a)bort? "
+ printf "Use (r)emote or (l)ocal, or (a)bort? "
read ans
case "$ans" in
[lL]*)
resolve_deleted_merge () {
while /bin/true; do
- echo -n "Use (m)odified or (d)eleted file, or (a)bort? "
+ printf "Use (m)odified or (d)eleted file, or (a)bort? "
read ans
case "$ans" in
[mM]*)
echo "Normal merge conflict for $path:"
describe_file "$local_mode" "local" "$LOCAL"
describe_file "$remote_mode" "remote" "$REMOTE"
- echo -n "Hit return to start merge resolution tool ($merge_tool): "
+ printf "Hit return to start merge resolution tool (%s): " "$merge_tool"
read ans
case "$merge_tool" in
else
while true; do
echo "$path seems unchanged."
- echo -n "Was the merge successful? [y/n] "
+ printf "Was the merge successful? [y/n] "
read answer < /dev/tty
case "$answer" in
y*|Y*) status=0; break ;;
else
while true; do
echo "$path seems unchanged."
- echo -n "Was the merge successful? [y/n] "
+ printf "Was the merge successful? [y/n] "
read answer < /dev/tty
case "$answer" in
y*|Y*) status=0; break ;;
echo Merging the files: $files
git ls-files -u | sed -e 's/^[^ ]* //' | sort -u | while read i
do
- echo ""
+ printf "\n"
merge_file "$i" < /dev/tty > /dev/tty
done
else
while test $# -gt 0; do
- echo ""
+ printf "\n"
merge_file "$1"
shift
done