<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/combine-diff.c, branch v1.5.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.5.2</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.5.2'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2007-05-16T04:16:03Z</updated>
<entry>
<title>Ensure return value from xread() is always stored into an ssize_t</title>
<updated>2007-05-16T04:16:03Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2007-05-15T12:49:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=8a912bcb250d8bf57b225e1cf02c0d69d54c8920'/>
<id>urn:sha1:8a912bcb250d8bf57b225e1cf02c0d69d54c8920</id>
<content type='text'>
This patch fixes all calls to xread() where the return value is not
stored into an ssize_t. The patch should not have any effect whatsoever,
other than putting better/more appropriate type names on variables.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Support 'diff=pgm' attribute</title>
<updated>2007-04-23T05:16:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-04-23T00:52:55Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f1af60bdba465779df92090ed370988f202ff043'/>
<id>urn:sha1:f1af60bdba465779df92090ed370988f202ff043</id>
<content type='text'>
This enhances the attributes mechanism so that external programs
meant for existing GIT_EXTERNAL_DIFF interface can be specifed
per path.

To configure such a custom diff driver, first define a custom
diff driver in the configuration:

	[diff "my-c-diff"]
		command = &lt;&lt;your command string comes here&gt;&gt;

Then mark the paths that you want to use this custom driver
using the attribute mechanism.

	*.c	diff=my-c-diff

The intent of this separation is that the attribute mechanism is
used for specifying the type of the contents, while the
configuration mechanism is used to define what needs to be done
to that type of the contents, which would be specific to both
platform and personal taste.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Cast 64 bit off_t to 32 bit size_t</title>
<updated>2007-03-07T19:15:26Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2007-03-07T01:44:37Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=dc49cd769b5fa6b7e0114b051c34a849828a7603'/>
<id>urn:sha1:dc49cd769b5fa6b7e0114b051c34a849828a7603</id>
<content type='text'>
Some systems have sizeof(off_t) == 8 while sizeof(size_t) == 4.
This implies that we are able to access and work on files whose
maximum length is around 2^63-1 bytes, but we can only malloc or
mmap somewhat less than 2^32-1 bytes of memory.

On such a system an implicit conversion of off_t to size_t can cause
the size_t to wrap, resulting in unexpected and exciting behavior.
Right now we are working around all gcc warnings generated by the
-Wshorten-64-to-32 option by passing the off_t through xsize_t().

In the future we should make xsize_t on such problematic platforms
detect the wrapping and die if such a file is accessed.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Tell multi-parent diff about core.symlinks.</title>
<updated>2007-03-04T03:30:34Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2007-03-03T19:38:00Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a249a9b5a26e841a28f6e993a560d749303cf91c'/>
<id>urn:sha1:a249a9b5a26e841a28f6e993a560d749303cf91c</id>
<content type='text'>
When core.symlinks is false, and a merge of symbolic links had conflicts,
the merge result is left as a file in the working directory. A decision
must be made whether the file is treated as a regular file or as a
symbolic link. This patch treats the file as a symbolic link only if
all merge parents were also symbolic links.

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>convert object type handling from a string to a number</title>
<updated>2007-02-27T09:34:21Z</updated>
<author>
<name>Nicolas Pitre</name>
<email>nico@cam.org</email>
</author>
<published>2007-02-26T19:55:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=21666f1aae4e890d8f50924f9e80763b27e6a45d'/>
<id>urn:sha1:21666f1aae4e890d8f50924f9e80763b27e6a45d</id>
<content type='text'>
We currently have two parallel notation for dealing with object types
in the code: a string and a numerical value.  One of them is obviously
redundent, and the most used one requires more stack space and a bunch
of strcmp() all over the place.

This is an initial step for the removal of the version using a char array
found in object reading code paths.  The patch is unfortunately large but
there is no sane way to split it in smaller parts without breaking the
system.

Signed-off-by: Nicolas Pitre &lt;nico@cam.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>diff --cc: integer overflow given a 2GB-or-larger file</title>
<updated>2007-02-27T09:03:37Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2007-02-26T23:11:35Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ee24ee55c28e46b502e4e2d219feced5a5d67e6b'/>
<id>urn:sha1:ee24ee55c28e46b502e4e2d219feced5a5d67e6b</id>
<content type='text'>
Few of us use git to compare or even version-control 2GB files,
but when we do, we'll want it to work.

Reading a recent patch, I noticed two lines like this:

   int len = st.st_size;

Instead of "int", that should be "size_t".  Otherwise, in the
non-symlink case, with 64-bit size_t, if the file's size is 2GB,
the following xmalloc will fail:

   result = xmalloc(len + 1);

trying to allocate 2^64 - 2^31 + 1 bytes (assuming sign-extension
in the int-to-size_t promotion).  And even if it didn't fail, the
subsequent "result[len] = 0;" would be equivalent to an unpleasant
"result[-2147483648] = 0;"

The other nearby "int"-declared size variable, sz, should also be of
type size_t, for the same reason.  If sz ever wraps around and becomes
negative, xread will corrupt memory _before_ the "result" buffer.

Signed-off-by: Jim Meyering &lt;jim@meyering.net&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>diff --cc: fix display of symlink conflicts during a merge.</title>
<updated>2007-02-26T06:25:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-02-26T06:24:47Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4fc970c43884e6215c13d6944a2def1eb2134ed5'/>
<id>urn:sha1:4fc970c43884e6215c13d6944a2def1eb2134ed5</id>
<content type='text'>
"git-diff-files --cc" to show conflicts during merge did not pass
the correct mode information for the working tree down, and showed
bogus combined diff.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>combine-diff: special case --unified=0</title>
<updated>2007-02-04T00:31:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-02-03T20:37:54Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3b0f5e88ee039e96822d7d0127a59d78936c222f'/>
<id>urn:sha1:3b0f5e88ee039e96822d7d0127a59d78936c222f</id>
<content type='text'>
Even when --unified=0 is given, the main loop to show the
combined textual diff needs to handle a line that is unchanged
but has lines that were deleted relative to a parent before it
(because that is where the lost lines hang).  However, such a
line should not be emitted in the final output.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/combined'</title>
<updated>2006-10-26T09:07:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-10-26T09:07:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=af70fa4f48fdb12fef49c8bf2abc507f80081bf3'/>
<id>urn:sha1:af70fa4f48fdb12fef49c8bf2abc507f80081bf3</id>
<content type='text'>
* jc/combined:
  combine-diff: honour --no-commit-id
  combine-diff: fix hunk_comment_line logic.
</content>
</entry>
<entry>
<title>combine-diff: honour --no-commit-id</title>
<updated>2006-10-26T09:05:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-10-26T09:05:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=44152787bcb4fd003d1f5b8c2a7591445cee8f20'/>
<id>urn:sha1:44152787bcb4fd003d1f5b8c2a7591445cee8f20</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
