<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git/apply.c, branch v1.0.4</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/'/>
<entry>
<title>xread/xwrite: do not worry about EINTR at calling sites.</title>
<updated>2005-12-20T02:28:16+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-12-20T00:18:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=1c15afb9343bca82e687d008ec983a9110ac9c40'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>git-apply: work from subdirectory.</title>
<updated>2005-11-29T07:13:01+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-26T07:14:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=edf2e37002eeb30a2ccad5db3b3e1fe41cdc7eb0'/>
<id>edf2e37002eeb30a2ccad5db3b3e1fe41cdc7eb0</id>
<content type='text'>
When applying a patch to index file, we need to know where GIT_DIR is;
use setup_git_directory() to find it out.  This also allows us to work
from a subdirectory if we wanted to.

When git-apply is run from a subdirectory, it applies the given patch
only to the files under the current directory and below.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When applying a patch to index file, we need to know where GIT_DIR is;
use setup_git_directory() to find it out.  This also allows us to work
from a subdirectory if we wanted to.

When git-apply is run from a subdirectory, it applies the given patch
only to the files under the current directory and below.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Deal with binary diff output from GNU diff 2.8.7</title>
<updated>2005-11-18T05:14:29+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-18T04:46:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=3200d1aee0c22a34d075aafefe3e92f4f7d08840'/>
<id>3200d1aee0c22a34d075aafefe3e92f4f7d08840</id>
<content type='text'>
Some vintage of diff says just "Files X and Y differ\n", instead
of "Binary files X and Y differ\n", so catch both patterns.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some vintage of diff says just "Files X and Y differ\n", instead
of "Binary files X and Y differ\n", so catch both patterns.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: allow-binary-replacement.</title>
<updated>2005-11-17T00:20:40+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-15T01:37:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=011f4274bbb14e44035586f2ede695d584b8cfd2'/>
<id>011f4274bbb14e44035586f2ede695d584b8cfd2</id>
<content type='text'>
A new option, --allow-binary-replacement, is introduced.

When you feed a diff that records full SHA1 name of pre- and
post-image blob on its index line to git-apply with this option,
the post-image blob replaces the path if what you have in the
working tree matches the pre-image _and_ post-image blob is
already available in the object directory.

Later we _might_ want to enhance the diff output to also include
the full binary data of the post-image, to make this more
useful, but this is good enough for local rebasing application.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A new option, --allow-binary-replacement, is introduced.

When you feed a diff that records full SHA1 name of pre- and
post-image blob on its index line to git-apply with this option,
the post-image blob replaces the path if what you have in the
working tree matches the pre-image _and_ post-image blob is
already available in the object directory.

Later we _might_ want to enhance the diff output to also include
the full binary data of the post-image, to make this more
useful, but this is good enough for local rebasing application.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>git-apply: fail if a patch cannot be applied.</title>
<updated>2005-11-16T22:12:56+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-16T22:12:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=92927ed0aac56a86f85049215791fcd106af4b62'/>
<id>92927ed0aac56a86f85049215791fcd106af4b62</id>
<content type='text'>
Recently we fixed 'git-apply --stat' not to barf on a binary
differences.  But it accidentally broke the error detection when
we actually attempt to apply them.

This commit fixes the problem and adds test cases.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recently we fixed 'git-apply --stat' not to barf on a binary
differences.  But it accidentally broke the error detection when
we actually attempt to apply them.

This commit fixes the problem and adds test cases.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>apply: fix binary patch detection.</title>
<updated>2005-11-15T01:15:07+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-15T01:15:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=9add69b1b1f76db874ed899c46fbe0b252aa3c23'/>
<id>9add69b1b1f76db874ed899c46fbe0b252aa3c23</id>
<content type='text'>
The comparison to find "Binary files " string was looking at a
wrong place when offset != 0.

Also, we may have the full 40-byte textual sha1 on the index
line; two off-by-one errors prevented it.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The comparison to find "Binary files " string was looking at a
wrong place when offset != 0.

Also, we may have the full 40-byte textual sha1 on the index
line; two off-by-one errors prevented it.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Documentation: git-apply --no-add</title>
<updated>2005-11-12T05:18:18+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-10T04:53:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=e433705dd4dc52c45e5d82b615f07b5a4b27f185'/>
<id>e433705dd4dc52c45e5d82b615f07b5a4b27f185</id>
<content type='text'>
This is a specialized hack to help no-base merges, but other
people might find it useful, so let's document it.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a specialized hack to help no-base merges, but other
people might find it useful, so let's document it.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>merge-one-file: use common as base, instead of emptiness.</title>
<updated>2005-11-12T05:18:17+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-10T04:38:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=cb93c19365760d939f05d9a3c2ef4499f0d5ce16'/>
<id>cb93c19365760d939f05d9a3c2ef4499f0d5ce16</id>
<content type='text'>
Unlike the previous round that merged the path added differently
in each branches using emptiness as the base, compute a common
version and use it as input to 'merge' program.

This would show the resulting (still conflicting) file left in
the working tree as:

	common file contents...
	&lt;&lt;&lt;&lt;&lt;&lt; FILENAME
	version from our branch...
	======
	version from their branch...
	&gt;&gt;&gt;&gt;&gt;&gt; .merge_file_XXXXXX
	more common file contents...

when both sides added similar contents.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unlike the previous round that merged the path added differently
in each branches using emptiness as the base, compute a common
version and use it as input to 'merge' program.

This would show the resulting (still conflicting) file left in
the working tree as:

	common file contents...
	&lt;&lt;&lt;&lt;&lt;&lt; FILENAME
	version from our branch...
	======
	version from their branch...
	&gt;&gt;&gt;&gt;&gt;&gt; .merge_file_XXXXXX
	more common file contents...

when both sides added similar contents.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>git-apply: do not fail on binary diff when not applying nor checking.</title>
<updated>2005-11-09T23:19:50+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-11-09T22:59:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=ff36de0847768873cc793afd6378d3b229591436'/>
<id>ff36de0847768873cc793afd6378d3b229591436</id>
<content type='text'>
We run git-apply with --stat and --summary at the end of the pull
by default, which causes it to barf when the pull brought in changes
to binary files.  Just mark them as binary patch and proceed when
not applying nor checking.

[jc: I almost missed --check until I saw Linus did something similar.]

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We run git-apply with --stat and --summary at the end of the pull
by default, which causes it to barf when the pull brought in changes
to binary files.  Just mark them as binary patch and proceed when
not applying nor checking.

[jc: I almost missed --check until I saw Linus did something similar.]

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>git-apply --numstat</title>
<updated>2005-10-29T05:28:57+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-10-28T09:43:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=7d8b7c21c9c0bee0d94fcf3b350e24ebdb920b74'/>
<id>7d8b7c21c9c0bee0d94fcf3b350e24ebdb920b74</id>
<content type='text'>
The new option, --numstat, shows number of inserted and deleted
lines for each path.  It is similar to --stat output but is
meant to be more machine friendly by giving number of added and
deleted lines and unabbreviated paths.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new option, --numstat, shows number of inserted and deleted
lines for each path.  It is similar to --stat output but is
meant to be more machine friendly by giving number of added and
deleted lines and unabbreviated paths.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
