Re: [BUG?] Spaces not allowed in directory names in .git/info/attributes

3 messages, 3 authors, 2016-06-16 · open the first message on its own page

Re: [BUG?] Spaces not allowed in directory names in .git/info/attributes

From: Junio C Hamano <hidden>
Date: 2016-06-16 02:19:34

Nathan Collins [off-list ref] writes:
Example session:

    $ git init test.git
    Initialized empty Git repository in /tmp/test.git/.git/
    $ cd test.git
    $ mkdir "dir name"
    $ touch dir\ name/file.txt
    $ echo "dir\\ name/file.txt -text -whitespace" >> .git/info/attributes
    $ git add dir\ name/file.txt
    name/file.txt is not a valid attribute name: .git/info/attributes:1
That's because spaces are not allowed in paths there.

	echo "dir?name/file.txt -text" >.git/info/attributes

may be an easy workaround for now.

Re: [BUG?] Spaces not allowed in directory names in .git/info/attributes

From: Duy Nguyen <hidden>
Date: 2016-06-16 02:19:34

On Tue, May 24, 2016 at 3:30 AM, Junio C Hamano [off-list ref] wrote:
Nathan Collins [off-list ref] writes:
quoted
Example session:

    $ git init test.git
    Initialized empty Git repository in /tmp/test.git/.git/
    $ cd test.git
    $ mkdir "dir name"
    $ touch dir\ name/file.txt
    $ echo "dir\\ name/file.txt -text -whitespace" >> .git/info/attributes
    $ git add dir\ name/file.txt
    name/file.txt is not a valid attribute name: .git/info/attributes:1
That's because spaces are not allowed in paths there.

        echo "dir?name/file.txt -text" >.git/info/attributes

may be an easy workaround for now.
Maybe bring back [1] (cquoting paths) and optionally optionally with
backslash escaping? The conclusion at the end of that thread seems to
be "ok, we may break rare setups, we just need to be upfront about
it". Another option is the pathspec way: match quotes literally as
well.

[1] http://thread.gmane.org/gmane.comp.version-control.git/160597/focus=160720
-- 
Duy

Re: [BUG?] Spaces not allowed in directory names in .git/info/attributes

From: Nathan Collins <hidden>
Date: 2016-06-16 02:19:36

On Mon, May 23, 2016 at 1:30 PM, Junio C Hamano [off-list ref] wrote:
Nathan Collins [off-list ref] writes:
quoted
Example session:

    $ git init test.git
    Initialized empty Git repository in /tmp/test.git/.git/
    $ cd test.git
    $ mkdir "dir name"
    $ touch dir\ name/file.txt
    $ echo "dir\\ name/file.txt -text -whitespace" >> .git/info/attributes
    $ git add dir\ name/file.txt
    name/file.txt is not a valid attribute name: .git/info/attributes:1
That's because spaces are not allowed in paths there.

        echo "dir?name/file.txt -text" >.git/info/attributes

may be an easy workaround for now.
Thanks, I'll use the workaround,

-nathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help