Opened 6 years ago
Last modified 6 years ago
#13101 new enhancement
Unified diff in git format?
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | next-major-releases |
Component: | version control/changeset view | Version: | |
Severity: | minor | Keywords: | diff bitesized |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Is the diff format of "Download in other formats: Unified Diff" in changeset view configurable?
I'm no expert on the various diff formats. wikipedia:Diff#Unified_format says:
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—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
Trac includes such Index:
headers. Many tools (GNU patch
, hg import
, git apply
) require a -p0
switch to understand this.
It would be convenient if Trac could also create diffs in a different format that does not require remembering special switches.
git diff-format typically uses a different format(?) with a/
/ b/
prefixes and "extended header lines".
Mercurial also supports "git extended diff format".
Attachments (0)
Change History (1)
comment:1 by , 6 years ago
Keywords: | bitesized added |
---|---|
Milestone: | → next-major-releases |
Priority: | normal → low |
Severity: | normal → minor |
-p
opiton ofgit apply
andhg patch
is optional and 1 by default but GNUpatch
always requires-p
option.