Re: [PATCH v7 00/31] Support multiple checkouts
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 14, 2014, 04:45 UTC
- Message-ID
- <xmqqvbr0zgy1.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1405227068-25506-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 5 quoted lines
> fd = open(git_path("repos/%s/gitdir", id), O_RDONLY);
> ...
> - while (path[len - 1] == '\n' || path[len - 1] == '\r')
> + while (len && (path[len - 1] == '\n' || path[len - 1] == '\r'))
> len--;Do we anticipate (or even allow/endorse) that end users will edit this file with a random editor? And, to a lessor degree, the same question on the reading side. Do we encourage users to directly read from this file to learn something about their repository?
If we are the only tool that writes into this file, and if we are the only tool to be used to read (and use) the contents of this file, I do not see the need to cater to LF vs CRLF line endings.