git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [BUG?] Spaces not allowed in directory names in .git/info/attributes
@ 2016-05-23 19:06 Nathan Collins
  2016-05-23 20:30 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Nathan Collins @ 2016-05-23 19:06 UTC (permalink / raw)
  To: git

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

I'm using

    $ git --version
    git version 2.5.0

Cheers,

-nathan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] Spaces not allowed in directory names in .git/info/attributes
  2016-05-23 19:06 [BUG?] Spaces not allowed in directory names in .git/info/attributes Nathan Collins
@ 2016-05-23 20:30 ` Junio C Hamano
  2016-05-24  1:37   ` Duy Nguyen
  2016-05-24 23:30   ` Nathan Collins
  0 siblings, 2 replies; 6+ messages in thread
From: Junio C Hamano @ 2016-05-23 20:30 UTC (permalink / raw)
  To: Nathan Collins; +Cc: git

Nathan Collins <nathan.collins@gmail.com> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] Spaces not allowed in directory names in .git/info/attributes
  2016-05-23 20:30 ` Junio C Hamano
@ 2016-05-24  1:37   ` Duy Nguyen
  2016-05-24 22:54     ` Junio C Hamano
  2016-05-25 21:56     ` Junio C Hamano
  2016-05-24 23:30   ` Nathan Collins
  1 sibling, 2 replies; 6+ messages in thread
From: Duy Nguyen @ 2016-05-24  1:37 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Nathan Collins, git

On Tue, May 24, 2016 at 3:30 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Nathan Collins <nathan.collins@gmail.com> 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.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] Spaces not allowed in directory names in .git/info/attributes
  2016-05-24  1:37   ` Duy Nguyen
@ 2016-05-24 22:54     ` Junio C Hamano
  2016-05-25 21:56     ` Junio C Hamano
  1 sibling, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2016-05-24 22:54 UTC (permalink / raw)
  To: Duy Nguyen; +Cc: Nathan Collins, git

Duy Nguyen <pclouds@gmail.com> writes:

> 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".

Yup, even though I do not think this is something urgent.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] Spaces not allowed in directory names in .git/info/attributes
  2016-05-23 20:30 ` Junio C Hamano
  2016-05-24  1:37   ` Duy Nguyen
@ 2016-05-24 23:30   ` Nathan Collins
  1 sibling, 0 replies; 6+ messages in thread
From: Nathan Collins @ 2016-05-24 23:30 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Mon, May 23, 2016 at 1:30 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Nathan Collins <nathan.collins@gmail.com> 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.

Thanks, I'll use the workaround,

-nathan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG?] Spaces not allowed in directory names in .git/info/attributes
  2016-05-24  1:37   ` Duy Nguyen
  2016-05-24 22:54     ` Junio C Hamano
@ 2016-05-25 21:56     ` Junio C Hamano
  1 sibling, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2016-05-25 21:56 UTC (permalink / raw)
  To: Duy Nguyen; +Cc: Nathan Collins, git

Duy Nguyen <pclouds@gmail.com> writes:

> 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

I coaxed the ancient patch that was done in the 1.7.2 timeperiod and
will push out the result near the tip of jc/attr topic that has been
cooking in 'pu'.

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-25 21:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-23 19:06 [BUG?] Spaces not allowed in directory names in .git/info/attributes Nathan Collins
2016-05-23 20:30 ` Junio C Hamano
2016-05-24  1:37   ` Duy Nguyen
2016-05-24 22:54     ` Junio C Hamano
2016-05-25 21:56     ` Junio C Hamano
2016-05-24 23:30   ` Nathan Collins

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).