<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://fileformats.archiveteam.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fileformats.archiveteam.org/index.php?action=history&amp;feed=atom&amp;title=Talk%3AUnified_diff</id>
		<title>Talk:Unified diff - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://fileformats.archiveteam.org/index.php?action=history&amp;feed=atom&amp;title=Talk%3AUnified_diff"/>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=Talk:Unified_diff&amp;action=history"/>
		<updated>2026-06-17T06:14:46Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.2</generator>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=Talk:Unified_diff&amp;diff=51058&amp;oldid=prev</id>
		<title>Anonymoususer852: Added topics for discussion.</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=Talk:Unified_diff&amp;diff=51058&amp;oldid=prev"/>
				<updated>2025-09-21T00:00:15Z</updated>
		
		<summary type="html">&lt;p&gt;Added topics for discussion.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Identification mess ==&lt;br /&gt;
Not always does unified diff or patch files consistently begins with &amp;lt;code&amp;gt;@@&amp;lt;/code&amp;gt;. Some, notably older unified diff files also contains &amp;lt;code&amp;gt;***&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;---&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;---&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;+++&amp;lt;/code&amp;gt; to provide file changes, e.g.&lt;br /&gt;
  *** lib/cap/atalkdbm.c.orig	Wed Mar 20 17:02:57 1991&lt;br /&gt;
  --- lib/cap/atalkdbm.c	Wed Mar 20 17:03:30 1991&lt;br /&gt;
  ***************&lt;br /&gt;
  *** 1,7 ****&lt;br /&gt;
    /*&lt;br /&gt;
  !  * $Date: 91/03/15 14:56:00 $&lt;br /&gt;
  !  * $Header: atalkdbm.c,v 2.3 91/03/15 14:56:00 djh Exp $&lt;br /&gt;
  !  * $Revision: 2.3 $&lt;br /&gt;
Source: https://tsubaki.st.ryukoku.ac.jp/pub/network/cap/cap.patches/cap60.patch001&lt;br /&gt;
&lt;br /&gt;
In general, a modern &amp;lt;code&amp;gt;patch&amp;lt;/code&amp;gt; utility will often detect whether or not if the supplied file is in the specified unified diff format and prompt if necessary.&lt;br /&gt;
&lt;br /&gt;
[[User:Anonymoususer852|Anonymoususer852]] ([[User talk:Anonymoususer852|talk]]) 00:00, 21 September 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Interesting quirks when applying changes via the utilities ==&lt;br /&gt;
=== &amp;lt;code&amp;gt;.orig&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;.rej&amp;lt;/code&amp;gt; files ===&lt;br /&gt;
&amp;lt;code&amp;gt;patch&amp;lt;/code&amp;gt; will produce a file with &amp;lt;code&amp;gt;.orig&amp;lt;/code&amp;gt; extension if:&lt;br /&gt;
* &amp;lt;code&amp;gt;--backup&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--backup-if-mismatch&amp;lt;/code&amp;gt; is set, or&lt;br /&gt;
* the targeted file is successfully applied with fuzzing&lt;br /&gt;
** fuzzing &amp;quot;only applies to diffs that have context, and causes patch to ignore up to that many lines of context in looking for places to install a hunk.&amp;quot; -- https://www.gnu.org/software/diffutils/manual/html_node/Inexact.html&lt;br /&gt;
&lt;br /&gt;
In addition, &amp;lt;code&amp;gt;patch&amp;lt;/code&amp;gt; will produce a file with &amp;lt;code&amp;gt;.rej&amp;lt;/code&amp;gt; extension if:&lt;br /&gt;
* the specified diff/patch file does not correctly match with the contents of the file to be patched itself, or&lt;br /&gt;
* the fuzz factor was set too low&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;git apply --3way ...&amp;lt;/code&amp;gt; in particular will not generate either of these files in applicable cases, if the changes did not apply cleanly.&lt;br /&gt;
&lt;br /&gt;
=== Preserving timestamp ===&lt;br /&gt;
When applying changes via GNU &amp;lt;code&amp;gt;patch&amp;lt;/code&amp;gt;, the updated file or files often has the last-modified time adjusted to the date when the changes were applied. This is a rather unfortunate side-effect in which those wanting to preserve timestamp that is as indicated (which is an optional field) in the supplied unified diff or patch be consequently lost in the process. While it is possible to re-adjust the last-modified timestamp to more accurately represent the time when it was initially modified, via &amp;lt;code&amp;gt;touch&amp;lt;/code&amp;gt;, there is no trivial way of doing that as either,&lt;br /&gt;
* Indicated timestamp format is tied to the creator of unified diff's locale,&lt;br /&gt;
** i.e. it may or may not be in [[wikipedia:ISO_8601|ISO 8601]] format,&lt;br /&gt;
** timezone is specific to the creator of unified diff, which can cause time skew/variance&lt;br /&gt;
* The optional field is not in a time format, but RCS/VCS indicating changes from the version that it was previously from, or,&lt;br /&gt;
* The optional field is empty&lt;br /&gt;
&lt;br /&gt;
[[User:Anonymoususer852|Anonymoususer852]] ([[User talk:Anonymoususer852|talk]]) 00:00, 21 September 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Anonymoususer852</name></author>	</entry>

	</feed>