git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Julliard <julliard@winehq.org>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] ls-files: Don't require exclude files to end with a newline.
Date: Mon, 20 Mar 2006 10:14:01 +0100	[thread overview]
Message-ID: <87d5ghbhra.fsf@wine.dyndns.org> (raw)
In-Reply-To: <20060319212911.GD18185@pasky.or.cz> (Petr Baudis's message of "Sun, 19 Mar 2006 22:29:11 +0100")

Petr Baudis <pasky@suse.cz> writes:

> Dear diary, on Sat, Mar 18, 2006 at 11:27:45AM CET, I got a letter
> where Alexandre Julliard <julliard@winehq.org> said that...
>> Without this patch, the last line of an exclude file is silently
>> ignored if it doesn't end with a newline.
>> 
>> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
>
> $ echo -en "a\nb" | wc -l
> 1
>
> In UNIX, a line is a string terminated by a newline, therefore the blob
> past the last newline character is not really a line at all. ;-)
>
> Perhaps a warning might be in order. Why don't you just add the trailing
> newline to the file?

Of course I can do that, but I think that if a user entered something
on the last line it's a safe bet they didn't mean for it to be
ignored; and since it's trivial to DTRT here, I don't see why we
shouldn't.

-- 
Alexandre Julliard
julliard@winehq.org

      reply	other threads:[~2006-03-20  9:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-18 10:27 [PATCH] ls-files: Don't require exclude files to end with a newline Alexandre Julliard
2006-03-19 21:29 ` Petr Baudis
2006-03-20  9:14   ` Alexandre Julliard [this message]

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=87d5ghbhra.fsf@wine.dyndns.org \
    --to=julliard@winehq.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).