<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/patch.git/src/pch.c, branch origin</title>
<subtitle>git.savannah.gnu.org: git/patch.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/'/>
<entry>
<title>Improve handling of LF vs. CRLF line endings</title>
<updated>2012-09-22T18:02:48+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-09-22T17:55:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=db1bd7f6934cd8d04ec1fb6347a5571c2e7e1234'/>
<id>db1bd7f6934cd8d04ec1fb6347a5571c2e7e1234</id>
<content type='text'>
* src/patch.c (check_line_endings): New function.
(main): When a hunk fails, report when the line endings differ between the
input file and the patch.
* src/pch.c (there_is_another_patch): When saying that we strip trailing CRs,
also say how to turn this off.
* tests/crlf-handling: Update changed messages.  Add test case that fails.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/patch.c (check_line_endings): New function.
(main): When a hunk fails, report when the line endings differ between the
input file and the patch.
* src/pch.c (there_is_another_patch): When saying that we strip trailing CRs,
also say how to turn this off.
* tests/crlf-handling: Update changed messages.  Add test case that fails.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce function to lstat all input files</title>
<updated>2012-09-19T01:07:31+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-09-18T23:52:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=59609b50c538db1805161cb8afe9986f82b9759a'/>
<id>59609b50c538db1805161cb8afe9986f82b9759a</id>
<content type='text'>
* src/util.c (stat_file): New function.
(move_file): Use here.
* src/util.h (stat_file): Declare here.
* src/inp.c (get_input_file): Use here.
* src/patch.c (main): Use here.
(delete_file_later): Use here.
* src/pch.c (there_is_another_patch): Use here.
(intuit_diff_type): Use here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/util.c (stat_file): New function.
(move_file): Use here.
* src/util.h (stat_file): Declare here.
* src/inp.c (get_input_file): Use here.
* src/patch.c (main): Use here.
(delete_file_later): Use here.
* src/pch.c (there_is_another_patch): Use here.
(intuit_diff_type): Use here.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use stat where we want to follow symlinks</title>
<updated>2012-09-19T00:51:23+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-09-18T23:44:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=b578985c3cdf160ad58b43715bdfa324cdf15618'/>
<id>b578985c3cdf160ad58b43715bdfa324cdf15618</id>
<content type='text'>
* src/pch.c (prefix_components): Follow symlinks.
(cwd_is_root): Follow symlinks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/pch.c (prefix_components): Follow symlinks.
(cwd_is_root): Follow symlinks.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow to use potentially dangerous filenames from the root directory</title>
<updated>2012-09-17T13:48:06+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-09-17T13:25:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=20c9d7d5abc41d5a2c6cfed9fe69654ae9a3a4f6'/>
<id>20c9d7d5abc41d5a2c6cfed9fe69654ae9a3a4f6</id>
<content type='text'>
* src/pch.c (cwd_is_root): New function to check if we are in the root
directory of a filename.
(name_is_valid): Allow to use potentially dangerous filenames when the current
working directory is the root directory: from there, those names are not
any more dangerous than other names.
* tests/bad-filenames: New test case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/pch.c (cwd_is_root): New function to check if we are in the root
directory of a filename.
(name_is_valid): Allow to use potentially dangerous filenames when the current
working directory is the root directory: from there, those names are not
any more dangerous than other names.
* tests/bad-filenames: New test case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change the type of *_needs_removal from int to bool</title>
<updated>2012-09-13T14:34:58+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-04-14T11:41:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=f0388d2dbff7903e514f86947f3b7c7e29e674c8'/>
<id>f0388d2dbff7903e514f86947f3b7c7e29e674c8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Support double-quoted filenames in all context diff formats</title>
<updated>2012-08-11T09:09:11+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-08-11T09:09:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=66aeedee12d621113fe0906b7cbd124cc4e9ebd5'/>
<id>66aeedee12d621113fe0906b7cbd124cc4e9ebd5</id>
<content type='text'>
* src/util.c (fetchname): Always recognize double-quoted filenames.
* src/util.h (fetchname): Update prototype.
* src/pch.c (intuit_diff_type): Update calls to fetchname().
* tests/quoted-filenames: Change to a normal unified diff.
* NEWS: Update.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/util.c (fetchname): Always recognize double-quoted filenames.
* src/util.h (fetchname): Update prototype.
* src/pch.c (intuit_diff_type): Update calls to fetchname().
* tests/quoted-filenames: Change to a normal unified diff.
* NEWS: Update.
</pre>
</div>
</content>
</entry>
<entry>
<title>build: mark an internal function as "pure"</title>
<updated>2012-08-01T13:05:42+00:00</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-08-01T12:32:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=1118f832efe3920ffe9b57cdd8c0af1ac9a76993'/>
<id>1118f832efe3920ffe9b57cdd8c0af1ac9a76993</id>
<content type='text'>
* src/pch.c (sha1_says_nonexistent): Apply _GL_ATTRIBUTE_PURE,
to avoid failure with -Werror=suggest-attribute=pure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/pch.c (sha1_says_nonexistent): Apply _GL_ATTRIBUTE_PURE,
to avoid failure with -Werror=suggest-attribute=pure.
</pre>
</div>
</content>
</entry>
<entry>
<title>Accessor functions for SHA1 hashes in git-style diffs</title>
<updated>2012-07-31T19:58:30+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-07-27T13:17:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=b0c22022be55611cf1c60401ef794dbb94767ed9'/>
<id>b0c22022be55611cf1c60401ef794dbb94767ed9</id>
<content type='text'>
* src/pch.c (p_sha1): New variable.
(get_sha1): New function for saving a sha1 checksum.
(sha1_says_nonexistent): Take a NULL terminated string instead of an end
pointer.
(intuit_diff_type): Remember the SHA1 hashes from index headers in git-style
diffs in p_sha1.
(pch_sha1): New function for accessing p_sha1.
* src/pch.h (pch_sha1): Declare.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/pch.c (p_sha1): New variable.
(get_sha1): New function for saving a sha1 checksum.
(sha1_says_nonexistent): Take a NULL terminated string instead of an end
pointer.
(intuit_diff_type): Remember the SHA1 hashes from index headers in git-style
diffs in p_sha1.
(pch_sha1): New function for accessing p_sha1.
* src/pch.h (pch_sha1): Declare.
</pre>
</div>
</content>
</entry>
<entry>
<title>Export the patch type</title>
<updated>2012-04-17T14:48:19+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-04-12T00:26:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=309ece2e5a2a8df85ef0328934693e28e83480ef'/>
<id>309ece2e5a2a8df85ef0328934693e28e83480ef</id>
<content type='text'>
* src/pch.c (p_git_diff): New global variable.
(intuit_diff_type): Use p_git_diff instead of a local variable.
(pch_git_diff): New function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/pch.c (p_git_diff): New global variable.
(intuit_diff_type): Use p_git_diff instead of a local variable.
(pch_git_diff): New function.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not delete files immediately</title>
<updated>2012-04-17T14:48:19+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruen@linbit.com</email>
</author>
<published>2012-04-17T09:56:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/patch.git/commit/?id=3b4824fb338c91f4c3a755084e35fef157163f8c'/>
<id>3b4824fb338c91f4c3a755084e35fef157163f8c</id>
<content type='text'>
Fixes the bug that more than one numbered backup would be created when a patch
file deletes and recreates a file.
* bootstrap.conf (gnulib_modules): Add linked-list and xlist modules.
* src/util.h (file_id_type): Add DELETE_LATER and OVERWRITTEN types.
(create_backup, set_file_attributes): Update prototype.
(insert_file_id): Add prototype.
* src/util.c (insert_file_id): Export.
(set_file_attributes, create_backup_copy): Make the st argument const.
(create_backup): Pass in to_st instead of returning it from create_backup().
This obsoletes the to_errno argument.
(move_file): Determine to_st here and pass it to create_backup().  Remember
when a file is overwritten.
* src/patch.c (output_file): Add to_st parameter.  Remember files to delete
instead of deleting them immediately.  Pass from-st to create_backup().
(file_to_delete): New struct.
(init_files_to_delete, delete_file_later, delete_files): New functions.
(main): Use init_files_to_delete() and delete_files().  Pass to_st to
output_file() where we already have it.
* src/pch.c (intuit_diff_type): Assume that files which are marked for deletion
don't exist.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes the bug that more than one numbered backup would be created when a patch
file deletes and recreates a file.
* bootstrap.conf (gnulib_modules): Add linked-list and xlist modules.
* src/util.h (file_id_type): Add DELETE_LATER and OVERWRITTEN types.
(create_backup, set_file_attributes): Update prototype.
(insert_file_id): Add prototype.
* src/util.c (insert_file_id): Export.
(set_file_attributes, create_backup_copy): Make the st argument const.
(create_backup): Pass in to_st instead of returning it from create_backup().
This obsoletes the to_errno argument.
(move_file): Determine to_st here and pass it to create_backup().  Remember
when a file is overwritten.
* src/patch.c (output_file): Add to_st parameter.  Remember files to delete
instead of deleting them immediately.  Pass from-st to create_backup().
(file_to_delete): New struct.
(init_files_to_delete, delete_file_later, delete_files): New functions.
(main): Use init_files_to_delete() and delete_files().  Pass to_st to
output_file() where we already have it.
* src/pch.c (intuit_diff_type): Assume that files which are marked for deletion
don't exist.
</pre>
</div>
</content>
</entry>
</feed>
