git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] guilt: add option guilt.diffstat

From
JSJosef Jeff Sipek <jeffpc@josefsipek.net>
Date
Dec 13, 2008, 06:23 UTC
Message-ID
<20081213062313.GE15407@josefsipek.net>
In-Reply-To
<200812130018.56061.bss03@volumehost.net>
On Sat, Dec 13, 2008 at 12:18:50AM -0600, Boyd Stephen Smith Jr. wrote:
Show 9 quoted lines
> On Friday 2008 December 12 22:43:57 Josef Jeff Sipek wrote:
> >> +		if [ -n "$5" -o "x$diffstat" = "x1" ]; then
> >
> >Why the 'x' thing? I've seen it is some scripts before, but I can't think of
> >a reason to use it if the variable is surrounded in quotation marks.
> 
> '[' or test see the arguments after they are unquoted (normally).  So, 
> if "$diffstat" is "-n" it might try and do the -n test, rather than the = 
> test.
Oh. I haven't even thought of that posibility!
> It could be re-written as "1" == "${diffstat}" instead to avoid the x, but 
> it's not a big deal (to me).  That also looks backwards to a lot of people.
Including me.
Thanks for the info.
Josef 'Jeff' Sipek.
-- 
Penguin : Linux version 2.6.25.4 on an i386 machine (6135.73 BogoMips).
Previous: Boyd Stephen Smith Jr.Next: Wu Fengguang
Message 4 of 9 in “guilt: add option guilt.diffstat”
  1. guilt: add option guilt.diffstatWu Fengguang, Dec 13, 2008
  2. Josef Jeff SipekDec 13, 2008
  3. Boyd Stephen Smith Jr.Dec 13, 2008
  4. Josef Jeff SipekDec 13, 2008
  5. Wu FengguangDec 13, 2008
  6. [RESEND] guilt: add option guilt.diffstatWu Fengguang, Dec 18, 2008
  7. Josef Jeff SipekDec 18, 2008
  8. Wu FengguangDec 19, 2008
  9. Josef Jeff SipekDec 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.