git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Riesen" <raa.lkml@gmail.com>
To: "Carl Worth" <cworth@cworth.org>
Cc: "Junio C Hamano" <junkio@cox.net>,
	"Krzysiek Pawlik" <krzysiek.pawlik@people.pl>,
	git@vger.kernel.org
Subject: Re: [PATCH] git-rm: Fix to properly handle files with spaces, tabs, newlines, etc.
Date: Fri, 24 Feb 2006 14:23:08 +0100	[thread overview]
Message-ID: <81b0412b0602240523l1b10c910q6e5d2e3cef82e306@mail.gmail.com> (raw)
In-Reply-To: <8764n7rl6s.wl%cworth@cworth.org>

On 2/23/06, Carl Worth <cworth@cworth.org> wrote:
> +# Setup some files to be removed, some with funny characters
> +touch -- foo bar baz 'space embedded' 'tab     embedded' 'newline
> +embedded' -q
> +git-add -- foo bar baz 'space embedded' 'tab   embedded' 'newline
> +embedded' -q
> +git-commit -m "add files"

This doesn't work on some exotic filesystems (ntfs and fat):

*** t3600-rm.sh ***
touch: cannot touch `tab\tembedded': No such file or directory
touch: cannot touch `newline\nembedded': No such file or directory
error: pathspec 'tab    embedded' did not match any.
error: pathspec 'newline
embedded' did not match any.
Maybe you misspelled it?
Nothing to commit
* FAIL 1: Pre-check that foo exists and is in index before git-rm foo
        [ -f foo ] && git-ls-files --error-unmatch foo
* FAIL 2: Test that git-rm foo succeeds
        git-rm foo
* FAIL 4: Pre-check that bar exists and is in index before "git-rm -f bar"
        [ -f bar ] && git-ls-files --error-unmatch bar
* FAIL 5: Test that "git-rm -f bar" succeeds
        git-rm -f bar
* FAIL 6: Post-check that bar does not exist and is not in index after
"git-rm -f bar"
        ! [ -f bar ] && ! git-ls-files --error-unmatch bar
* FAIL 7: Test that "git-rm -- -q" succeeds (remove a file that looks
like an option)
        git-rm -- -q
* FAIL 8: Test that "git-rm -f" succeeds with embedded space, tab, or
newline characters.
        git-rm -f 'space embedded' 'tab embedded' 'newline
        embedded'
* FAIL 10: When the rm in "git-rm -f" fails, it should not remove the
file from the index
        git-ls-files --error-unmatch baz
* failed 8 among 10 test(s)

  parent reply	other threads:[~2006-02-24 13:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-21 21:47 [PATCH] Add new git-rm command with documentation Carl Worth
2006-02-21 22:07 ` Krzysiek Pawlik
2006-02-21 22:14   ` Shawn Pearce
2006-02-21 22:29     ` Krzysiek Pawlik
2006-02-21 22:32       ` Shawn Pearce
2006-02-21 22:36         ` Krzysiek Pawlik
2006-02-21 22:49   ` Carl Worth
2006-02-21 23:04     ` Carl Worth
2006-02-22  8:19       ` Junio C Hamano
2006-02-23  0:08         ` [PATCH] git-rm: Fix to properly handle files with spaces, tabs, newlines, etc Carl Worth
2006-02-23  0:37           ` Carl Worth
2006-02-23  1:07             ` Junio C Hamano
2006-02-24 13:23           ` Alex Riesen [this message]
2006-02-25  6:05             ` Junio C Hamano
2006-02-21 22:15 ` [PATCH] Add new git-rm command with documentation 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=81b0412b0602240523l1b10c910q6e5d2e3cef82e306@mail.gmail.com \
    --to=raa.lkml@gmail.com \
    --cc=cworth@cworth.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=krzysiek.pawlik@people.pl \
    /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).