From: Brandon Casey <redacted>
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 <redacted>
---
t/t7300-clean.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
From: Jeff King <hidden> Date: 2016-06-15 22:49:33
On Wed, Sep 15, 2010 at 03:58:22PM -0500, Brandon Casey wrote:
From: Brandon Casey <redacted>
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.
Hmm, this seemed eerily familiar, and sure enough:
http://article.gmane.org/gmane.comp.version-control.git/101270
I don't _think_ I had Solaris 7 anytime recently, so the issue may be
even more widespread (I would guess that my patch was a result of
Solaris 8). Anyway, good catch.
-Peff
Does this call for a git_touch which does a regular 'touch' for each
of its arguments?
I don't know the broken touch's behavior, and I don't have it handy. It
might handle "touch 1" fine or it might interpret it as "touch at time
1, no file arguments". Brandon's solution is good enough for a test
script.
If you really wanted a portable git_touch, you would spell it ">>$file".
-Peff