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

Re: [PATCH] t1301-shared-repo.sh: fix 'stat' portability issue

From
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Date
Aug 17, 2007, 12:48 UTC
Message-ID
<20070817124828.GB11107@informatik.uni-freiburg.de>
In-Reply-To
<20070816220217.GH25161@regex.yaph.org>
Hello,
Show 10 quoted lines
> +	actual="$(ls -l .git/info/refs)" &&
> +	case "$actual" in
> +	-r--r--r--*)
> +		: happy
> +		;;
> +	*)
> +		echo Oops, .git/info/refs is not 0444
> +		false
> +		;;
> +	esac

Don't know if this matters here, but a while ago I learnd that if I really need to parse output of ls -l, then I should set LANG=C and LC_ALL=C. I didn't see any breakage when LS_COLORS is set, but maybe you want to reset that, too?

Best regards Uwe

-- 
Uwe Kleine-König

http://www.google.com/search?q=2004+in+roman+numerals
Previous: Arjen LaarhovenNext: Junio C Hamano
Message 4 of 5 in “t1301-shared-repo.sh: fix 'stat' portability issue”
  1. t1301-shared-repo.sh: fix 'stat' portability issueArjen Laarhoven, Aug 16, 2007
  2. Junio C HamanoAug 16, 2007
  3. Arjen LaarhovenAug 16, 2007
  4. Uwe Kleine-KönigAug 17, 2007
  5. Junio C HamanoAug 17, 2007

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.