Re: [GUILT 04/28] Allow guilt import-commit to run from a dir which contains spaces.

2014-05-06 Thread Jeff Sipek
On Sun, Mar 23, 2014 at 10:13:53PM +0100, Per Cederqvist wrote:
 On Sun, Mar 23, 2014 at 9:07 PM, Jeff Sipek jef...@josefsipek.net wrote:
  On Sun, Mar 23, 2014 at 08:57:08PM +0100, Per Cederqvist wrote:
  On Sun, Mar 23, 2014 at 6:04 PM, Jeff Sipek jef...@josefsipek.net wrote:
 
   On Fri, Mar 21, 2014 at 08:31:42AM +0100, Per Cederqvist wrote:
  
   Signed-off-by: Per Cederqvist ced...@opera.com
   ---
guilt-import-commit | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
  
   diff --git a/guilt-import-commit b/guilt-import-commit
   index 20dcee2..9488ded 100755
   --- a/guilt-import-commit
   +++ b/guilt-import-commit
   @@ -23,7 +23,7 @@ if ! must_commit_first; then
fi
  
disp About to begin conversion... 2
   -disp Current head: `cat $GIT_DIR/refs/heads/\`git_branch\`` 2
   +disp Current head: `cat \$GIT_DIR\/refs/heads/\`git_branch\`` 2
  
   I wonder if it'd be better to use 'git rev-parse' here instead of 
   looking at
   the refs directly.
  
   IOW,
  
   disp Current head: `git rev-parse \`git_branch\`` 2
 
  That is probably a good idea. I only made the minimum change
  required to get the test suite to pass.
 
  I totally understand.
 
   Maybe even $() instead of the inner `` to clean it up some more.
 
  Yes, given that that construct is already used in several places
  it is apparently portable enough for guilt. (I guess nobody uses
  /bin/sh on Solaris to run guilt. It doesn't support the $(...)
  construct.)
 
  Hrm?  I'm using OpenIndiana (OpenSolaris derivative) and my /bin/sh seems to
  be a symlink to ksh93.  What version of Solaris are you seeing this behavior
  on?
 
 Solaris 10:
 
 Last login: Sun Mar 23 20:53:28 2014 from c80-217-121-12.
 Sun Microsystems Inc.   SunOS 5.10  Generic January 2005
 You have mail.
 500 ceder@bacon uname -a
 SunOS bacon 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Fire-15000
 501 ceder@bacon /bin/sh
 $ echo `id`
 uid=105(ceder) gid=20105(ceder)
 $ echo $(id)
 syntax error: `(' unexpected
 
 /bin/sh is a symlink to /sbin/sh.
 
 On Solaris 10, you are supposed to use /usr/xpg4/bin/sh if you want
 a competent standards-compliant shell. /bin/sh is provided as a very
 backward-compatible shell.

Ok, I finally got back to this series...

I'd say let's use the nested ``.

Jeff.

-- 
Hegh QaQ law'
quvHa'ghach QaQ puS
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GUILT 04/28] Allow guilt import-commit to run from a dir which contains spaces.

2014-03-23 Thread Jeff Sipek
On Fri, Mar 21, 2014 at 08:31:42AM +0100, Per Cederqvist wrote:
 Signed-off-by: Per Cederqvist ced...@opera.com
 ---
  guilt-import-commit | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/guilt-import-commit b/guilt-import-commit
 index 20dcee2..9488ded 100755
 --- a/guilt-import-commit
 +++ b/guilt-import-commit
 @@ -23,7 +23,7 @@ if ! must_commit_first; then
  fi
  
  disp About to begin conversion... 2
 -disp Current head: `cat $GIT_DIR/refs/heads/\`git_branch\`` 2
 +disp Current head: `cat \$GIT_DIR\/refs/heads/\`git_branch\`` 2

I wonder if it'd be better to use 'git rev-parse' here instead of looking at
the refs directly.

IOW,

disp Current head: `git rev-parse \`git_branch\`` 2

Maybe even $() instead of the inner `` to clean it up some more.

Jeff.

  
  for rev in `git rev-list $rhash`; do
   s=`git log --pretty=oneline -1 $rev | cut -c 42-`
 @@ -46,7 +46,7 @@ for rev in `git rev-list $rhash`; do
   do_make_header $rev
   echo 
   git diff --binary $rev^..$rev
 - )  $GUILT_DIR/$branch/$fname
 + )  $GUILT_DIR/$branch/$fname
  
   # FIXME: grab the GIT_AUTHOR_DATE from the commit object and set the
   # timestamp on the patch
 @@ -68,6 +68,6 @@ for rev in `git rev-list $rhash`; do
  done
  
  disp Done. 2
 -disp Current head: `cat $GIT_DIR/refs/heads/\`git_branch\`` 2
 +disp Current head: `cat \$GIT_DIR\/refs/heads/\`git_branch\`` 2
  
  }
 -- 
 1.8.3.1
 

-- 
It used to be said [...] that AIX looks like one space alien discovered
Unix, and described it to another different space alien who then implemented
AIX. But their universal translators were broken and they'd had to gesture a
lot.
- Paul Tomblin 
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GUILT 04/28] Allow guilt import-commit to run from a dir which contains spaces.

2014-03-23 Thread Per Cederqvist
On Sun, Mar 23, 2014 at 6:04 PM, Jeff Sipek jef...@josefsipek.net wrote:

 On Fri, Mar 21, 2014 at 08:31:42AM +0100, Per Cederqvist wrote:

 Signed-off-by: Per Cederqvist ced...@opera.com
 ---
  guilt-import-commit | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

 diff --git a/guilt-import-commit b/guilt-import-commit
 index 20dcee2..9488ded 100755
 --- a/guilt-import-commit
 +++ b/guilt-import-commit
 @@ -23,7 +23,7 @@ if ! must_commit_first; then
  fi

  disp About to begin conversion... 2
 -disp Current head: `cat $GIT_DIR/refs/heads/\`git_branch\`` 2
 +disp Current head: `cat \$GIT_DIR\/refs/heads/\`git_branch\`` 2

 I wonder if it'd be better to use 'git rev-parse' here instead of looking at
 the refs directly.

 IOW,

 disp Current head: `git rev-parse \`git_branch\`` 2

That is probably a good idea. I only made the minimum change
required to get the test suite to pass.

 Maybe even $() instead of the inner `` to clean it up some more.

Yes, given that that construct is already used in several places
it is apparently portable enough for guilt. (I guess nobody uses
/bin/sh on Solaris to run guilt. It doesn't support the $(...)
construct.)

 Jeff.

/ceder


  for rev in `git rev-list $rhash`; do
   s=`git log --pretty=oneline -1 $rev | cut -c 42-`
 @@ -46,7 +46,7 @@ for rev in `git rev-list $rhash`; do
   do_make_header $rev
   echo 
   git diff --binary $rev^..$rev
 - )  $GUILT_DIR/$branch/$fname
 + )  $GUILT_DIR/$branch/$fname

   # FIXME: grab the GIT_AUTHOR_DATE from the commit object and set the
   # timestamp on the patch
 @@ -68,6 +68,6 @@ for rev in `git rev-list $rhash`; do
  done

  disp Done. 2
 -disp Current head: `cat $GIT_DIR/refs/heads/\`git_branch\`` 2
 +disp Current head: `cat \$GIT_DIR\/refs/heads/\`git_branch\`` 2

  }
 --
 1.8.3.1


 --
 It used to be said [...] that AIX looks like one space alien discovered
 Unix, and described it to another different space alien who then implemented
 AIX. But their universal translators were broken and they'd had to gesture a
 lot.
 - Paul Tomblin
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GUILT 04/28] Allow guilt import-commit to run from a dir which contains spaces.

2014-03-23 Thread Jeff Sipek
On Sun, Mar 23, 2014 at 08:57:08PM +0100, Per Cederqvist wrote:
 On Sun, Mar 23, 2014 at 6:04 PM, Jeff Sipek jef...@josefsipek.net wrote:
 
  On Fri, Mar 21, 2014 at 08:31:42AM +0100, Per Cederqvist wrote:
 
  Signed-off-by: Per Cederqvist ced...@opera.com
  ---
   guilt-import-commit | 6 +++---
   1 file changed, 3 insertions(+), 3 deletions(-)
 
  diff --git a/guilt-import-commit b/guilt-import-commit
  index 20dcee2..9488ded 100755
  --- a/guilt-import-commit
  +++ b/guilt-import-commit
  @@ -23,7 +23,7 @@ if ! must_commit_first; then
   fi
 
   disp About to begin conversion... 2
  -disp Current head: `cat $GIT_DIR/refs/heads/\`git_branch\`` 2
  +disp Current head: `cat \$GIT_DIR\/refs/heads/\`git_branch\`` 2
 
  I wonder if it'd be better to use 'git rev-parse' here instead of looking at
  the refs directly.
 
  IOW,
 
  disp Current head: `git rev-parse \`git_branch\`` 2
 
 That is probably a good idea. I only made the minimum change
 required to get the test suite to pass.

I totally understand.

  Maybe even $() instead of the inner `` to clean it up some more.
 
 Yes, given that that construct is already used in several places
 it is apparently portable enough for guilt. (I guess nobody uses
 /bin/sh on Solaris to run guilt. It doesn't support the $(...)
 construct.)

Hrm?  I'm using OpenIndiana (OpenSolaris derivative) and my /bin/sh seems to
be a symlink to ksh93.  What version of Solaris are you seeing this behavior
on?

Jeff.

-- 
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.
- George Bernard Shaw
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GUILT 04/28] Allow guilt import-commit to run from a dir which contains spaces.

2014-03-23 Thread Per Cederqvist
On Sun, Mar 23, 2014 at 9:07 PM, Jeff Sipek jef...@josefsipek.net wrote:
 On Sun, Mar 23, 2014 at 08:57:08PM +0100, Per Cederqvist wrote:
 On Sun, Mar 23, 2014 at 6:04 PM, Jeff Sipek jef...@josefsipek.net wrote:

  On Fri, Mar 21, 2014 at 08:31:42AM +0100, Per Cederqvist wrote:
 
  Signed-off-by: Per Cederqvist ced...@opera.com
  ---
   guilt-import-commit | 6 +++---
   1 file changed, 3 insertions(+), 3 deletions(-)
 
  diff --git a/guilt-import-commit b/guilt-import-commit
  index 20dcee2..9488ded 100755
  --- a/guilt-import-commit
  +++ b/guilt-import-commit
  @@ -23,7 +23,7 @@ if ! must_commit_first; then
   fi
 
   disp About to begin conversion... 2
  -disp Current head: `cat $GIT_DIR/refs/heads/\`git_branch\`` 2
  +disp Current head: `cat \$GIT_DIR\/refs/heads/\`git_branch\`` 2
 
  I wonder if it'd be better to use 'git rev-parse' here instead of looking 
  at
  the refs directly.
 
  IOW,
 
  disp Current head: `git rev-parse \`git_branch\`` 2

 That is probably a good idea. I only made the minimum change
 required to get the test suite to pass.

 I totally understand.

  Maybe even $() instead of the inner `` to clean it up some more.

 Yes, given that that construct is already used in several places
 it is apparently portable enough for guilt. (I guess nobody uses
 /bin/sh on Solaris to run guilt. It doesn't support the $(...)
 construct.)

 Hrm?  I'm using OpenIndiana (OpenSolaris derivative) and my /bin/sh seems to
 be a symlink to ksh93.  What version of Solaris are you seeing this behavior
 on?

Solaris 10:

Last login: Sun Mar 23 20:53:28 2014 from c80-217-121-12.
Sun Microsystems Inc.   SunOS 5.10  Generic January 2005
You have mail.
500 ceder@bacon uname -a
SunOS bacon 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Fire-15000
501 ceder@bacon /bin/sh
$ echo `id`
uid=105(ceder) gid=20105(ceder)
$ echo $(id)
syntax error: `(' unexpected

/bin/sh is a symlink to /sbin/sh.

On Solaris 10, you are supposed to use /usr/xpg4/bin/sh if you want
a competent standards-compliant shell. /bin/sh is provided as a very
backward-compatible shell.

 Jeff.

/ceder
 --
 The reasonable man adapts himself to the world; the unreasonable one
 persists in trying to adapt the world to himself. Therefore all progress
 depends on the unreasonable man.
 - George Bernard Shaw
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GUILT 04/28] Allow guilt import-commit to run from a dir which contains spaces.

2014-03-21 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com
---
 guilt-import-commit | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/guilt-import-commit b/guilt-import-commit
index 20dcee2..9488ded 100755
--- a/guilt-import-commit
+++ b/guilt-import-commit
@@ -23,7 +23,7 @@ if ! must_commit_first; then
 fi
 
 disp About to begin conversion... 2
-disp Current head: `cat $GIT_DIR/refs/heads/\`git_branch\`` 2
+disp Current head: `cat \$GIT_DIR\/refs/heads/\`git_branch\`` 2
 
 for rev in `git rev-list $rhash`; do
s=`git log --pretty=oneline -1 $rev | cut -c 42-`
@@ -46,7 +46,7 @@ for rev in `git rev-list $rhash`; do
do_make_header $rev
echo 
git diff --binary $rev^..$rev
-   )  $GUILT_DIR/$branch/$fname
+   )  $GUILT_DIR/$branch/$fname
 
# FIXME: grab the GIT_AUTHOR_DATE from the commit object and set the
# timestamp on the patch
@@ -68,6 +68,6 @@ for rev in `git rev-list $rhash`; do
 done
 
 disp Done. 2
-disp Current head: `cat $GIT_DIR/refs/heads/\`git_branch\`` 2
+disp Current head: `cat \$GIT_DIR\/refs/heads/\`git_branch\`` 2
 
 }
-- 
1.8.3.1

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html