<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/copy.c, branch v2.6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.6.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-05-19T21:48:54Z</updated>
<entry>
<title>copy.c: make copy_fd() report its status silently</title>
<updated>2015-05-19T21:48:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-05-19T17:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=00b7cbfcb36b6679c64ad0566c0fc251f7e979fe'/>
<id>urn:sha1:00b7cbfcb36b6679c64ad0566c0fc251f7e979fe</id>
<content type='text'>
When copy_fd() function encounters errors, it emits error messages
itself, which makes it impossible for callers to take responsibility
for reporting errors, especially when they want to ignore certain
errors.

Move the error reporting to its callers in preparation.

 - copy_file() and copy_file_with_time() by indirection get their
   own calls to error().

 - hold_lock_file_for_append(), when told to die on error, used to
   exit(128) relying on the error message from copy_fd(), but now it
   does its own die() instead.  Note that the callers that do not
   pass LOCK_DIE_ON_ERROR need to be adjusted for this change, but
   fortunately there is none ;-)

 - filter_buffer_or_fd() has its own error() already, in addition to
   the message from copy_fd(), so this will change the output but
   arguably in a better way.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>copy_fd(): do not close the input file descriptor</title>
<updated>2014-08-28T17:25:14Z</updated>
<author>
<name>Steffen Prohaska</name>
<email>prohaska@zib.de</email>
</author>
<published>2014-08-26T15:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b29763aa9bcbb99a59aec3820e30ff1864cfa765'/>
<id>urn:sha1:b29763aa9bcbb99a59aec3820e30ff1864cfa765</id>
<content type='text'>
The caller, not this function, opened the file descriptor; it is
selfish for the callee to close it when it is done reading from it.
The caller may want an option to rewind and re-read the contents
after it returns.

Simplify the loop to copy the input in full to the output; its
body essentially is what a call to write_in_full() helper does.

Signed-off-by: Steffen Prohaska &lt;prohaska@zib.de&gt;
Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>preserve mtime of local clone</title>
<updated>2009-09-13T08:32:26Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2009-09-12T09:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f7835a251c2c98df152792b15793b03e22bf078e'/>
<id>urn:sha1:f7835a251c2c98df152792b15793b03e22bf078e</id>
<content type='text'>
A local clone without hardlinks copies all objects, including dangling
ones, to the new repository. Since the mtimes are renewed, those
dangling objects cannot be pruned by "git gc --prune", even if they
would have been old enough for pruning in the original repository.

Instead, preserve mtime during copy. "git gc --prune" will then work
in the clone just like it did in the original.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>copy.c: copy_fd - correctly report write errors</title>
<updated>2008-04-23T04:21:08Z</updated>
<author>
<name>Ariel Badichi</name>
<email>abadichi@bezeqint.net</email>
</author>
<published>2008-04-23T01:05:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8b1f6de854ae95eb3f4225a71aad29ca086cfd2e'/>
<id>urn:sha1:8b1f6de854ae95eb3f4225a71aad29ca086cfd2e</id>
<content type='text'>
Previously, the errno could have been lost due to an intervening
close() call.

This patch also contains minor cosmetic changes.

Signed-off-by: Ariel Badichi &lt;abadichi@bezeqint.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Use a single implementation and API for copy_file()</title>
<updated>2008-02-25T21:06:49Z</updated>
<author>
<name>Daniel Barkalow</name>
<email>barkalow@iabervon.org</email>
</author>
<published>2008-02-25T19:24:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1468bd47833c6ec3c85620d6af1d910e9378f714'/>
<id>urn:sha1:1468bd47833c6ec3c85620d6af1d910e9378f714</id>
<content type='text'>
Originally by Kristian Hï¿œgsberg; I fixed the conversion of rerere, which
had a different API.

Signed-off-by: Daniel Barkalow &lt;barkalow@iabervon.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>War on whitespace</title>
<updated>2007-06-07T07:04:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-06-07T07:04:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a6080a0a44d5ead84db3dabbbc80e82df838533d'/>
<id>urn:sha1:a6080a0a44d5ead84db3dabbbc80e82df838533d</id>
<content type='text'>
This uses "git-apply --whitespace=strip" to fix whitespace errors that have
crept in to our source files over time.  There are a few files that need
to have trailing whitespaces (most notably, test vectors).  The results
still passes the test, and build result in Documentation/ area is unchanged.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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://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>copy_fd: close ifd on error</title>
<updated>2005-12-27T18:49:25Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2005-12-27T08:19:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=08337a97a2756cd89ab611444f37d67250d3c05b'/>
<id>urn:sha1:08337a97a2756cd89ab611444f37d67250d3c05b</id>
<content type='text'>
In copy_fd when write fails we ought to close input file descriptor.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>xread/xwrite: do not worry about EINTR at calling sites.</title>
<updated>2005-12-20T02:28:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-12-20T00:18:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c15afb9343bca82e687d008ec983a9110ac9c40'/>
<id>urn:sha1:1c15afb9343bca82e687d008ec983a9110ac9c40</id>
<content type='text'>
We had errno==EINTR check after read(2)/write(2) sprinkled all
over the places, always doing continue.  Consolidate them into
xread()/xwrite() wrapper routines.

Credits for suggestion goes to HPA -- bugs are mine.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>copy.c::copy_fd() - do not leak file descriptor on error return.</title>
<updated>2005-11-05T19:02:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-05T19:02:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e6c64fc1e9b3b9a5ea7101f8a2a499c9e2112da5'/>
<id>urn:sha1:e6c64fc1e9b3b9a5ea7101f8a2a499c9e2112da5</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
