1
0
mirror of https://github.com/git/git.git synced 2024-10-03 07:01:22 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Junio C Hamano
163b959194 Update 'crlf' attribute semantics.
This updates the semantics of 'crlf' so that .gitattributes file
can say "this is text, even though it may look funny".

Setting the `crlf` attribute on a path is meant to mark the path
as a "text" file.  'core.autocrlf' conversion takes place
without guessing the content type by inspection.

Unsetting the `crlf` attribute on a path is meant to mark the
path as a "binary" file.  The path never goes through line
endings conversion upon checkin/checkout.

Unspecified `crlf` attribute tells git to apply the
`core.autocrlf` conversion when the file content looks like
text.

Setting the `crlf` attribut to string value "input" is similar
to setting the attribute to `true`, but also forces git to act
as if `core.autocrlf` is set to `input` for the path.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-19 22:37:44 -07:00
Junio C Hamano
e4aee10a2e Change attribute negation marker from '!' to '-'.
At the same time, we do not want to allow arbitrary strings for
attribute names, as we are likely to want to extend the syntax
later.  Allow only alnum, dash, underscore and dot for now.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-15 15:49:41 -07:00
Junio C Hamano
35ebfd6a0c Define 'crlf' attribute.
This defines the semantics of 'crlf' attribute as an example.
When a path has this attribute unset (i.e. '!crlf'), autocrlf
line-end conversion is not applied.

Eventually we would want to let users to build a pipeline of
processing to munge blob data to filesystem format (and in the
other direction) based on combination of attributes, and at that
point the mechanism in convert_to_{git,working_tree}() that
looks at 'crlf' attribute needs to be enhanced.  Perhaps the
existing 'crlf' would become the first step in the input chain,
and the last step in the output chain.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-14 08:57:06 -07:00
Junio C Hamano
6716027108 Teach core.autocrlf to 'git apply'
This teaches git-apply that the data read from and written to
the filesystem might need to get converted to adjust for local
line-ending convention.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-17 15:27:47 -08:00
Junio C Hamano
634ede32ae t0020: add test for auto-crlf
This tests lowlevel of update/checkout codepaths and some patch
application.  Currently, variants of "git apply" that look at
the working tree files does not work, so it does not test the
patch application without parameter and with --index parameter
when autocrlf is set to produce CRLF files.

We should add test for diff generation too.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 14:54:00 -08:00