From: Jonathan del Strother <maillist@steelskies.com>
To: git@vger.kernel.org
Cc: Jonathan del Strother <jon.delStrother@bestbefore.tv>
Subject: [PATCH 1/3] Fixing path quoting in git-rebase
Date: Mon, 15 Oct 2007 14:13:47 +0100 [thread overview]
Message-ID: <11924540292687-git-send-email-maillist@steelskies.com> (raw)
In-Reply-To: <4711486B.1050301@op5.se>
From: Jonathan del Strother <jon.delStrother@bestbefore.tv>
git-rebase used to fail when run from a path with a space in.
Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
---
git-rebase.sh | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 1583402..9995d9d 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -59,7 +59,7 @@ continue_merge () {
die "$RESOLVEMSG"
fi
- cmt=`cat $dotest/current`
+ cmt=`cat "$dotest/current"`
if ! git diff-index --quiet HEAD
then
if ! git-commit -C "$cmt"
@@ -84,14 +84,14 @@ continue_merge () {
}
call_merge () {
- cmt="$(cat $dotest/cmt.$1)"
+ cmt="$(cat "$dotest/cmt.$1")"
echo "$cmt" > "$dotest/current"
hd=$(git rev-parse --verify HEAD)
cmt_name=$(git symbolic-ref HEAD)
- msgnum=$(cat $dotest/msgnum)
- end=$(cat $dotest/end)
+ msgnum=$(cat "$dotest/msgnum")
+ end=$(cat "$dotest/end")
eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"'
- eval GITHEAD_$hd='"$(cat $dotest/onto_name)"'
+ eval GITHEAD_$hd='"$(cat \"$dotest/onto_name\")"'
export GITHEAD_$cmt GITHEAD_$hd
git-merge-$strategy "$cmt^" -- "$hd" "$cmt"
rv=$?
@@ -140,10 +140,10 @@ do
}
if test -d "$dotest"
then
- prev_head="`cat $dotest/prev_head`"
- end="`cat $dotest/end`"
- msgnum="`cat $dotest/msgnum`"
- onto="`cat $dotest/onto`"
+ prev_head=$(cat "$dotest/prev_head")
+ end=$(cat "$dotest/end")
+ msgnum=$(cat "$dotest/msgnum")
+ onto=$(cat "$dotest/onto")
continue_merge
while test "$msgnum" -le "$end"
do
@@ -160,11 +160,11 @@ do
if test -d "$dotest"
then
git rerere clear
- prev_head="`cat $dotest/prev_head`"
- end="`cat $dotest/end`"
- msgnum="`cat $dotest/msgnum`"
+ prev_head=$(cat "$dotest/prev_head")
+ end=$(cat "$dotest/end")
+ msgnum=$(cat "$dotest/msgnum")
msgnum=$(($msgnum + 1))
- onto="`cat $dotest/onto`"
+ onto=$(cat "$dotest/onto")
while test "$msgnum" -le "$end"
do
call_merge "$msgnum"
--
1.5.3.1
next prev parent reply other threads:[~2007-10-15 13:14 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 21:13 [PATCH] Fixing path quoting issues Jonathan del Strother
2007-10-11 6:19 ` Johannes Sixt
2007-10-11 6:47 ` David Kastrup
2007-10-11 7:10 ` Johannes Sixt
2007-10-11 7:30 ` Jonathan del Strother
2007-10-11 7:41 ` Johannes Sixt
2007-10-11 20:53 ` David Kastrup
2007-10-11 21:22 ` Jonathan del Strother
2007-10-11 21:31 ` Johannes Schindelin
2007-10-11 21:40 ` David Kastrup
2007-10-12 6:43 ` Johannes Sixt
2007-10-12 11:17 ` Wincent Colaiuta
2007-10-12 11:37 ` Johannes Schindelin
2007-10-12 12:20 ` Wincent Colaiuta
2007-10-12 12:51 ` Johannes Schindelin
2007-10-12 13:14 ` David Kastrup
2007-10-13 18:12 ` Jonathan del Strother
2007-10-13 22:36 ` Andreas Ericsson
2007-10-15 13:13 ` Jonathan del Strother
2007-10-15 13:13 ` Jonathan del Strother [this message]
2007-10-15 13:39 ` [PATCH 1/3] Fixing path quoting in git-rebase Johannes Sixt
2007-10-17 9:14 ` Jonathan del Strother
2007-10-17 9:31 ` [PATCH] Quoting paths, take 3 Jonathan del Strother
2007-10-17 9:31 ` [PATCH 1/2] Fixing path quoting in git-rebase Jonathan del Strother
2007-10-17 9:31 ` [PATCH 2/2] Quoting paths in tests Jonathan del Strother
2007-10-17 11:32 ` Johannes Sixt
2007-10-17 17:07 ` Jonathan del Strother
2007-10-17 17:15 ` David Kastrup
2007-10-17 20:03 ` David Kastrup
2007-10-18 6:08 ` Johannes Sixt
2007-10-24 13:07 ` Jonathan del Strother
2007-10-17 10:41 ` [PATCH 1/2] Fixing path quoting in git-rebase Johannes Sixt
2007-10-15 13:13 ` [PATCH 2/3] Quoting paths in tests Jonathan del Strother
2007-10-15 13:47 ` Johannes Sixt
2007-10-15 14:00 ` Jonathan del Strother
2007-10-15 14:17 ` Johannes Sixt
2007-10-15 14:03 ` David Kastrup
2007-10-15 13:13 ` [PATCH 3/3] Fix apostrophe quoting " Jonathan del Strother
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11924540292687-git-send-email-maillist@steelskies.com \
--to=maillist@steelskies.com \
--cc=git@vger.kernel.org \
--cc=jon.delStrother@bestbefore.tv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).