Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Diff
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Extensions === There are some modifications and extensions to the diff formats that are used and understood by certain programs and in certain contexts. For example, some [[revision control]] systems—such as [[Subversion (software)|Subversion]]—specify a version number, "working copy", or any other comment instead of or in addition to a timestamp in the diff's header section. Some tools allow diffs for several different files to be merged into one, using a header for each modified file that may look something like this: Index: path/to/file.cpp The special case of files that do not end in a newline is not handled. Neither the unidiff utility nor the POSIX diff standard define a way to handle this type of files. (Indeed, such files are not "text" files by strict POSIX definitions.<ref>http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_403 {{Webarchive|url=https://web.archive.org/web/20130429195728/http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_403 |date=2013-04-29 }} Section 3.206</ref>) GNU diff and git produce "\ No newline at end of file" (or a translated version) as a diagnostic, but this behavior is not portable.<ref>{{cite web |title=Incomplete Lines (Comparing and Merging Files) |url=https://www.gnu.org/software/diffutils/manual/html_node/Incomplete-Lines.html |website=www.gnu.org}}</ref> GNU patch does not seem to handle this case, while git-apply does.<ref>{{cite web |title=git: apply.c |url=https://github.com/git/git/blob/69c786637d7a7fe3b2b8f7d989af095f5f49c3a8/apply.c#LL2901C35-L2901C39 |publisher=Git |date=8 May 2023}}</ref> The [[Patch (Unix)|patch]] program does not necessarily recognize implementation-specific diff output. GNU patch is, however, known to recognize git patches and act a little differently.<ref>{{cite web |title=patch.c\src - patch.git - GNU patch |url=https://git.savannah.gnu.org/cgit/patch.git/tree/src/patch.c?id=c835ecc67b7e37c0d0b7dd7e032209fdaa285808#n1919 |website=git.savannah.gnu.org |quote=In git-style diffs, the "before" state of each patch refers to the initial state before modifying any files,..}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)