<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/convert.c, branch v1.7.3.5</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.3.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.3.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2010-07-02T22:45:18Z</updated>
<entry>
<title>Don't expand CRLFs when normalizing text during merge</title>
<updated>2010-07-02T22:45:18Z</updated>
<author>
<name>Eyvind Bernhardsen</name>
<email>eyvind.bernhardsen@gmail.com</email>
</author>
<published>2010-07-02T19:20:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=43dd2332853b2460a5252b0f43d8de3c5b545b9a'/>
<id>urn:sha1:43dd2332853b2460a5252b0f43d8de3c5b545b9a</id>
<content type='text'>
Disable CRLF expansion when convert_to_working_tree() is called from
normalize_buffer().  This improves performance when merging branches
with conflicting line endings when core.eol=crlf or core.autocrlf=true
by making the normalization act as if core.eol=lf.

Signed-off-by: Eyvind Bernhardsen &lt;eyvind.bernhardsen@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Avoid conflicts when merging branches with mixed normalization</title>
<updated>2010-07-02T22:43:15Z</updated>
<author>
<name>Eyvind Bernhardsen</name>
<email>eyvind.bernhardsen@gmail.com</email>
</author>
<published>2010-07-02T19:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f217f0e86dc7bacc5dc127982eaadca758b558ce'/>
<id>urn:sha1:f217f0e86dc7bacc5dc127982eaadca758b558ce</id>
<content type='text'>
Currently, merging across changes in line ending normalization is
painful since files containing CRLF will conflict with normalized files,
even if the only difference between the two versions is the line
endings.  Additionally, any "real" merge conflicts that exist are
obscured because every line in the file has a conflict.

Assume you start out with a repo that has a lot of text files with CRLF
checked in (A):

      o---C
     /     \
    A---B---D

B: Add "* text=auto" to .gitattributes and normalize all files to
   LF-only

C: Modify some of the text files

D: Try to merge C

You will get a ridiculous number of LF/CRLF conflicts when trying to
merge C into D, since the repository contents for C are "wrong" wrt the
new .gitattributes file.

Fix ll-merge so that the "base", "theirs" and "ours" stages are passed
through convert_to_worktree() and convert_to_git() before a three-way
merge.  This ensures that all three stages are normalized in the same
way, removing from consideration differences that are only due to
normalization.

This feature is optional for now since it changes a low-level mechanism
and is not necessary for the majority of users.  The "merge.renormalize"
config variable enables it.

Signed-off-by: Eyvind Bernhardsen &lt;eyvind.bernhardsen@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'eb/core-eol'</title>
<updated>2010-06-21T13:02:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-21T13:02:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d5cff17edaf438bbf45a2130e9cadc0c938291d6'/>
<id>urn:sha1:d5cff17edaf438bbf45a2130e9cadc0c938291d6</id>
<content type='text'>
* eb/core-eol:
  Add "core.eol" config variable
  Rename the "crlf" attribute "text"
  Add per-repository eol normalization
  Add tests for per-repository eol normalization

Conflicts:
	Documentation/config.txt
	Makefile
</content>
</entry>
<entry>
<title>Merge branch 'fg/autocrlf'</title>
<updated>2010-06-21T13:02:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-21T13:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d249515f297d47df6d79167b988eaa7db0981178'/>
<id>urn:sha1:d249515f297d47df6d79167b988eaa7db0981178</id>
<content type='text'>
* fg/autocrlf:
  autocrlf: Make it work also for un-normalized repositories
</content>
</entry>
<entry>
<title>Merge branch 'gv/portable'</title>
<updated>2010-06-21T13:02:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-21T13:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=8d676d85f772ce3a100b6f0dddd1c34a7e4313cf'/>
<id>urn:sha1:8d676d85f772ce3a100b6f0dddd1c34a7e4313cf</id>
<content type='text'>
* gv/portable:
  test-lib: use DIFF definition from GIT-BUILD-OPTIONS
  build: propagate $DIFF to scripts
  Makefile: Tru64 portability fix
  Makefile: HP-UX 10.20 portability fixes
  Makefile: HPUX11 portability fixes
  Makefile: SunOS 5.6 portability fix
  inline declaration does not work on AIX
  Allow disabling "inline"
  Some platforms lack socklen_t type
  Make NO_{INET_NTOP,INET_PTON} configured independently
  Makefile: some platforms do not have hstrerror anywhere
  git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
  test_cmp: do not use "diff -u" on platforms that lack one
  fixup: do not unconditionally disable "diff -u"
  tests: use "test_cmp", not "diff", when verifying the result
  Do not use "diff" found on PATH while building and installing
  enums: omit trailing comma for portability
  Makefile: -lpthread may still be necessary when libc has only pthread stubs
  Rewrite dynamic structure initializations to runtime assignment
  Makefile: pass CPPFLAGS through to fllow customization

Conflicts:
	Makefile
	wt-status.h
</content>
</entry>
<entry>
<title>Add "core.eol" config variable</title>
<updated>2010-06-07T04:20:04Z</updated>
<author>
<name>Eyvind Bernhardsen</name>
<email>eyvind.bernhardsen@gmail.com</email>
</author>
<published>2010-06-04T19:29:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=942e7747678ecf5f118ea5b2d0c763166de21f3a'/>
<id>urn:sha1:942e7747678ecf5f118ea5b2d0c763166de21f3a</id>
<content type='text'>
Introduce a new configuration variable, "core.eol", that allows the user
to set which line endings to use for end-of-line-normalized files in the
working directory.  It defaults to "native", which means CRLF on Windows
and LF everywhere else.

Note that "core.autocrlf" overrides core.eol.  This means that

[core]
	autocrlf = true

puts CRLFs in the working directory even if core.eol is set to "lf".

Signed-off-by: Eyvind Bernhardsen &lt;eyvind.bernhardsen@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Rewrite dynamic structure initializations to runtime assignment</title>
<updated>2010-05-31T23:59:26Z</updated>
<author>
<name>Gary V. Vaughan</name>
<email>git@mlists.thewrittenword.com</email>
</author>
<published>2010-05-14T09:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=66dbfd55e38128db02eb340fcd89f54b734d4c6e'/>
<id>urn:sha1:66dbfd55e38128db02eb340fcd89f54b734d4c6e</id>
<content type='text'>
Unfortunately, there are still plenty of production systems with
vendor compilers that choke unless all compound declarations can be
determined statically at compile time, for example hpux10.20 (I can
provide a comprehensive list of our supported platforms that exhibit
this problem if necessary).

This patch simply breaks apart any compound declarations with dynamic
initialisation expressions, and moves the initialisation until after
the last declaration in the same block, in all the places necessary to
have the offending compilers accept the code.

Signed-off-by: Gary V. Vaughan &lt;gary@thewrittenword.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Rename the "crlf" attribute "text"</title>
<updated>2010-05-20T03:42:34Z</updated>
<author>
<name>Eyvind Bernhardsen</name>
<email>eyvind.bernhardsen@gmail.com</email>
</author>
<published>2010-05-19T20:43:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=5ec3e67052289217c84e53d2cda90d939ac5725b'/>
<id>urn:sha1:5ec3e67052289217c84e53d2cda90d939ac5725b</id>
<content type='text'>
As discussed on the list, "crlf" is not an optimal name.  Linus
suggested "text", which is much better.

Signed-off-by: Eyvind Bernhardsen &lt;eyvind.bernhardsen@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add per-repository eol normalization</title>
<updated>2010-05-20T03:36:15Z</updated>
<author>
<name>Eyvind Bernhardsen</name>
<email>eyvind.bernhardsen@gmail.com</email>
</author>
<published>2010-05-19T20:43:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=fd6cce9e89ab5ac1125a3b5f5611048ad22379e7'/>
<id>urn:sha1:fd6cce9e89ab5ac1125a3b5f5611048ad22379e7</id>
<content type='text'>
Change the semantics of the "crlf" attribute so that it enables
end-of-line normalization when it is set, regardless of "core.autocrlf".

Add a new setting for "crlf": "auto", which enables end-of-line
conversion but does not override the automatic text file detection.

Add a new attribute "eol" with possible values "crlf" and "lf".  When
set, this attribute enables normalization and forces git to use CRLF or
LF line endings in the working directory, respectively.

The line ending style to be used for normalized text files in the
working directory is set using "core.autocrlf".  When it is set to
"true", CRLFs are used in the working directory; when set to "input" or
"false", LFs are used.

Signed-off-by: Eyvind Bernhardsen &lt;eyvind.bernhardsen@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>autocrlf: Make it work also for un-normalized repositories</title>
<updated>2010-05-12T06:02:49Z</updated>
<author>
<name>Finn Arne Gangstad</name>
<email>finnag@pvv.org</email>
</author>
<published>2010-05-11T22:37:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c4805393d73425a5f467f10fa434fb99bfba17ac'/>
<id>urn:sha1:c4805393d73425a5f467f10fa434fb99bfba17ac</id>
<content type='text'>
Previously, autocrlf would only work well for normalized
repositories. Any text files that contained CRLF in the repository
would cause problems, and would be modified when handled with
core.autocrlf set.

Change autocrlf to not do any conversions to files that in the
repository already contain a CR. git with autocrlf set will never
create such a file, or change a LF only file to contain CRs, so the
(new) assumption is that if a file contains a CR, it is intentional,
and autocrlf should not change that.

The following sequence should now always be a NOP even with autocrlf
set (assuming a clean working directory):

git checkout &lt;something&gt;
touch *
git add -A .    (will add nothing)
git commit      (nothing to commit)

Previously this would break for any text file containing a CR.

Some of you may have been folowing Eyvind's excellent thread about
trying to make end-of-line translation in git a bit smoother.

I decided to attack the problem from a different angle: Is it possible
to make autocrlf behave non-destructively for all the previous problem cases?

Stealing the problem from Eyvind's initial mail (paraphrased and
summarized a bit):

1. Setting autocrlf globally is a pain since autocrlf does not work well
   with CRLF in the repo
2. Setting it in individual repos is hard since you do it "too late"
   (the clone will get it wrong)
3. If someone checks in a file with CRLF later, you get into problems again
4. If a repository once has contained CRLF, you can't tell autocrlf
   at which commit everything is sane again
5. autocrlf does needless work if you know that all your users want
   the same EOL style.

I belive that this patch makes autocrlf a safe (and good) default
setting for Windows, and this solves problems 1-4 (it solves 2 by being
set by default, which is early enough for clone).

I implemented it by looking for CR charactes in the index, and
aborting any conversion attempt if this is found.

Signed-off-by: Finn Arne Gangstad &lt;finag@pvv.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
