Re: Ignore pattern with trailing whitespace in .gitignore is void using git 1.8.1.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Thor Andreas Rognan <thor.rognan@xxxxxxxxx> writes:
>
>> Maybe I'm doing it wrong, or maybe it's the intended behaviour,
>> but I find that a trailing whitespace after a pattern in .gitignore
>> makes the pattern void with git 1.8.1.5.
>
> I doubt we do anything clever like that.
> ...
> The user tells to ignore anything followed by a dot followed by a
> lowercase Oh followed by a SP.  We ignore "hello. ", but not "hello.o"
> nor "hello.o  " (two SPs at the end), just as told.

Of course, having said all that, I do not think anybody objects too
deeply against a patch that change the behaviour to ignore trailing
whitespaces, as long as the patch leaves an escape hatch to allow
people who do want to specify a pattern that matches with pathnames
with trailing whitespaces.  Without thinking it through, perhaps

	echo '*.o\ ' >.gitignore

or something?

Technically speaking, such a change is a regression, but I doubt
that many people would mind it too much.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]