All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Greaves <david@dgreaves.com>
To: Junio C Hamano <junkio@cox.net>
Cc: GIT Mailing Lists <git@vger.kernel.org>
Subject: Re: [PATCH] Ignore file filter
Date: Fri, 13 May 2005 09:50:07 +0100	[thread overview]
Message-ID: <42846A3F.4030706@dgreaves.com> (raw)
In-Reply-To: <7v64xodshs.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:

>Just a half theoretical question.  How well does this perform
>when your filenames have:
>
>    - ' '  (ASCII 0x20)
>    - '\t' (ASCII 0x09)
>    - '\n' (ASCII 0x0a)
>    - '`'  (ASCII 0x60) backtick
>    - '$'  (ASCII 0x24) dollar sign
>
>in them?  Or is it the case that the rest of the Cogito is not
>careful enough and it does not matter to be careful only in this
>script?
>  
>
That's what the:
zerosep=$'-d "\0"'
is for.
It looks like the shell 'read' doesn't honour it though - I couldn't
make it work.

However, thanks, after I fixed the quotes I missed in:
-o \( $pass_files -eq 1 -a -f "$file" \) \
-o \( $pass_dirs -eq 1 -a -d "$file" \) \
-o \( $pass_links -eq 1 -a -h "$file" \) \

it handles all cases above except \n (of course)

Frankly I think we're beyond shell programming and we should be using
perl (IMHO as the 'best' and most portable text handler)
It also has a *fantastic* test harness available.

David

  parent reply	other threads:[~2005-05-13  8:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-12 21:30 [PATCH] Ignore file filter David Greaves
     [not found] ` <7v64xodshs.fsf@assigned-by-dhcp.cox.net>
2005-05-13  8:50   ` David Greaves [this message]
2005-05-13 23:12 ` Petr Baudis
2005-05-14  8:28   ` David Greaves
2005-05-14  9:01     ` Junio C Hamano
2005-05-14 14:24       ` Petr Baudis
2005-05-14 15:13         ` David Greaves
2005-05-14 15:30           ` [RFD] Ignore rules Petr Baudis
2005-05-14 17:51             ` David Greaves
2005-05-14 18:12             ` Junio C Hamano
2005-05-15  1:11               ` Jon Seymour
2005-05-15  6:05                 ` Junio C Hamano
2005-05-15  6:52                   ` Junio C Hamano
2005-05-15 20:27                   ` [RFD] git-run-with-user-path Junio C Hamano
2005-05-16  9:35                 ` [RFD] Ignore rules Matthias Urlichs
2005-05-16 16:05                   ` David Greaves
2005-05-14 12:21     ` [PATCH] Ignore file filter Petr Baudis
2005-05-14 14:28       ` David Greaves

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=42846A3F.4030706@dgreaves.com \
    --to=david@dgreaves.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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.