X Tutup
The Wayback Machine - https://web.archive.org/web/20201015143038/https://github.com/certbot/certbot/pull/2136
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.gitattributes: EOL=LF overrides auto #2136

Merged
merged 1 commit into from Jun 16, 2016
Merged

.gitattributes: EOL=LF overrides auto #2136

merged 1 commit into from Jun 16, 2016

Conversation

@tboegi
Copy link
Contributor

@tboegi tboegi commented Jan 10, 2016

The line

  • text=auto eol=lf
    in .gitattributes does not work as expected:
    setting eol=lf overrides text=auto, and works as
  • eol=lf
    or
  • text eol=lf

This is not what is intended, as binary files like *.gz go through
a CRLF -> LF conversion at commit time.

Use

  • crlf=auto
    instead (which is even understood by older Git versions, which are still in use)
The line
* text=auto eol=lf
in .gitattributes does not work as expected:
setting eol=lf overrides text=auto, and works as
* eol=lf
or
* text eol=lf

This is not what is intended, as binary files like *.gz go through
a CRLF -> LF conversion at commit time.

Use
* crlf=auto
instead (which is even understood by older Git versions, which are still in use)
@kuba
Copy link
Contributor

@kuba kuba commented Jan 10, 2016

Changes around .gitattributes CR/LF have proven to be problematic in the past (e.g. broken git blame). This should be reviewed / merged with double caution!

@tboegi
Copy link
Contributor Author

@tboegi tboegi commented Jan 11, 2016

Yes, one problem was introduced in
commit e9a2180:
The file docs/make.bat had originally be commit with CRLF into the repo.
After adding the .gitattributes file, the repo should have been normalized,
as described here:

https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
$ echo "* text=auto" >>.gitattributes
$ rm .git/index # Remove the index to force Git to
$ git reset # re-scan the working directory
$ git status # Show files that will be normalized
$ git add -u
$ git add .gitattributes
$ git commit -m "Introduce end-of-line normalization"

(I don't know why this didn't happen, hints how to improve the Git documentation are welcome)

In any case, the current master is normallized.

@bmw
Copy link
Member

@bmw bmw commented Jun 16, 2016

LGTM.

Sorry this took so long to review, but thanks for the PR @tboegi.

@bmw bmw merged commit 553b316 into certbot:master Jun 16, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.
X Tutup