From: Junio C Hamano Date: Mon, 22 Feb 2016 19:09:18 GMT Subject: Re: [PATCH v2 5/6] remote: read $GIT_DIR/branches/* with strbuf_getline() Message-ID: In-Reply-To: <56CA62D3.7060808@moritzneeb.de> Moritz Neeb writes: > The line read from the branch file is directly trimmed after reading with > strbuf_trim(). There is thus no logic expecting CR, so strbuf_getline_lf() > can be replaced by its CRLF counterpart. > > Signed-off-by: Moritz Neeb > --- > To be honest, I did not yet fully understand the purpose of this branches/ file. > What I'd expect is that it is some intermediary file while fetching? > Or is it edited directly by the user and thus it's necessary to strip spaces > that could be added accidentally? [Documentation/gitrepository-layout.txt] branches:: A slightly deprecated way to store shorthands to be used to specify a URL to 'git fetch', 'git pull' and 'git push'. A file can be stored as `branches/` and then 'name' can be given to these commands in place of 'repository' argument. See the REMOTES section in linkgit:git-fetch[1] for details. This mechanism is legacy and not likely to be found in modern repositories. This directory is ignored if $GIT_COMMON_DIR is set and "$GIT_COMMON_DIR/branches" will be used instead.