From: Martin Langhoff <martin@catalyst.net.nz>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org, Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: Re: [PATCH] cvsexportcommit: be graceful when "cvs status" reorders the arguments
Date: Tue, 19 Feb 2008 07:55:00 +1300 [thread overview]
Message-ID: <47B9D484.1020304@catalyst.net.nz> (raw)
In-Reply-To: <7v1w7ap0vo.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>>> The script uses File::Basename upfront so perhaps just simply...
>> I tried that. But as the file need not exist, "basename" went on strike.
>>
>> So I'll keep the (ugly) version.
?! basename() never touches the disk. I just read it to confirm -
$VERSION is 2.74 and I'm somewhat disappointed to find it's not as
portable as I'd expect (perhaps it gets hardcoded during install?).
And my /usr/bin/basename doesn't care if the file exists either
$ type basename
basename is /usr/bin/basename
$ basename /foo/bar/baz
baz
$ stat /foo/bar/baz
stat: cannot stat `/foo/bar/baz': No such file or directory
So I am fairly confident that we can safely use File::Basename's
basename() on arbitrary strings that look like a path. We use basename()
quite a bit in our perl scripts in git.
cheers,
m
--
-----------------------------------------------------------------------
Martin @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
NZ: +64(4)916-7224 MOB: +64(21)364-017 UK: 0845 868 5733 ext 7224
Make things as simple as possible, but no simpler - Einstein
-----------------------------------------------------------------------
next prev parent reply other threads:[~2008-02-18 18:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 1:31 [PATCH] cvsexportcommit: be graceful when "cvs status" reorders the arguments Johannes Schindelin
2008-02-18 3:03 ` Junio C Hamano
2008-02-18 3:20 ` Junio C Hamano
2008-02-18 15:25 ` Martin Langhoff
2008-02-18 16:27 ` Johannes Schindelin
2008-02-18 16:33 ` Martin Langhoff
2008-02-18 17:43 ` Johannes Schindelin
2008-02-18 17:55 ` [PATCH v2] " Johannes Schindelin
2008-02-18 17:54 ` [PATCH] " Johannes Schindelin
2008-02-18 18:36 ` Junio C Hamano
2008-02-18 18:50 ` Johannes Schindelin
2008-02-18 18:55 ` Martin Langhoff [this message]
2008-02-18 19:42 ` Johannes Schindelin
2008-02-18 20:06 ` Martin Langhoff
2008-02-18 20:29 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47B9D484.1020304@catalyst.net.nz \
--to=martin@catalyst.net.nz \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=robin.rosenberg@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.