All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] send-email: use catfile() to concatenate files
Date: Tue, 14 Sep 2010 13:35:40 -0700 (PDT)	[thread overview]
Message-ID: <m3iq28kqs4.fsf@localhost.localdomain> (raw)
In-Reply-To: <AANLkTim7y3qUqQ4TN4w9+5qwR-uLmCP=dTKnMUSnqUrP@mail.gmail.com>

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> On Tue, Sep 14, 2010 at 19:26, Junio C Hamano <gitster@pobox.com> wrote:
>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>>
>>> Change send-email to use Perl's catfile() function instead of
>>> "$dir/$file". If send-email is given a $dir that ends with a / we'll
>>> end up printing a double slashed path like "dir//mtfnpy.patch".
>>>
>>> This doesn't cause any problems since Perl's IO layer will handle it,
>>> but it looks ugly.
>>>
>>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>>
>> If you mentioned in the proposed log message that File::Spec::Functions
>> have been with us since Perl 5.6.1, it would have saved me (and others)
>> some time worrying about the portability issues.
> 
> I thought you might trust me to write portable code by default :)
> 
> Anyway, I forgot to mention it. But one can use the corelist(1)
> program to see when what modules appeared in perl core:
> 
>     $ corelist File::Spec::Functions
>     File::Spec::Functions was first released with perl 5.00504

Also using File::Spec / File::Spec::Functions makes code more portable
(with respect to things such as different directory separators, and
volume portion of pathname) than using "$dir/$file".

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2010-09-14 20:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 19:02 [PATCH] send-email: use catfile() to concatenate files Ævar Arnfjörð Bjarmason
2010-09-14 19:26 ` Junio C Hamano
2010-09-14 19:55   ` Ævar Arnfjörð Bjarmason
2010-09-14 20:35     ` Jakub Narebski [this message]
2010-09-14 20:42       ` Ævar Arnfjörð Bjarmason

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=m3iq28kqs4.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.