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

Re: [PATCH] t/t7300: workaround ancient touch by rearranging arguments

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2010, 22:08 UTC
Message-ID
<7vocby64oi.fsf@alter.siamese.dyndns.org>
In-Reply-To
<i6Vnwbi85zvoD6Nzpw2lc1cAb4fZRJiU13x2r3wnIFnHDZWo9gkMwp9pRXJjgiXl4Ce-ERc-tvc@cipher.nrlssc.navy.mil>
Brandon Casey <casey@nrlssc.navy.mil> writes:
Show 10 quoted lines
> From: Brandon Casey <drafnel@gmail.com>
>
> The ancient touch on Solaris 7 thinks that a decimal number supplied as
> the first argument specifies a date_time to give to the files specified by
> the remaining arguments.  In this case, it fails to parse '1' as a proper
> date_time and exits with a failure status.  Workaround this flaw by
> rearranging the arguments supplied to touch so that a non-digit appears
> first and touch will not be confused.
>
> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>

Yuck, there were other reasons why I tend to write ">file" in our tests, just to create a new and empty file, but I didn't remember seeing this one. It's been a while since I touched Solaris the last time.

Thanks for catching.
Show 18 quoted lines
>  t/t7300-clean.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
> index 7dbbea1..6c776e9 100755
> --- a/t/t7300-clean.sh
> +++ b/t/t7300-clean.sh
> @@ -443,7 +443,7 @@ test_expect_success 'git clean -e' '
>  	(
>  		cd repo &&
>  		git init &&
> -		touch 1 2 3 known &&
> +		touch known 1 2 3 &&
>  		git add known &&
>  		git clean -f -e 1 -e 2 &&
>  		test -e 1 &&
> -- 
> 1.7.2.1
Previous: Brandon CaseyNext: Jeff King
Message 2 of 5 in “t/t7300: workaround ancient touch by rearranging arguments”
  1. t/t7300: workaround ancient touch by rearranging argumentsBrandon Casey, Sep 15, 2010
  2. Junio C HamanoSep 15, 2010
  3. Jeff KingSep 16, 2010
  4. Sverre RabbelierSep 17, 2010
  5. Jeff KingSep 18, 2010

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.