Git produces Unidiff - Does it really?
- From
- Jan Engelhardt <jengelh@medozas.de>
- Date
- May 24, 2009, 23:15 UTC
- Message-ID
- <alpine.LSU.2.00.0905250105410.22963@fbirervta.pbzchgretzou.qr>
Hi,
so I noticed that the diff output generated by git tools, such as "git diff", "git log -p", etc. is not accepted by TortoiseSVN, but is accepted by patch(1). Now I wondered which program could be at fault. Git produces:
--- a/src/foo.c +++ b/src/foo.c @@ your hunk goes here... @@ etc.
Random webpages[1,2] have a tendency wanting to tell me unidiff is
--- a/src/foo.c $TIMESTAMP +++ b/src/foo.c $TIMESTAMP @@ hunks... @@
instead, i.e. with the timestamp. Since the diff format is known to be sketchy (are there _any_ uptodate specs that are actually followed?), which tool(s) is/are to blame?
* git for not producing unidiff(-with-a-timestamp) * TSVN for not accepting unidiff(-without-a-timestamp) (* patch for accepting unidiff body together with a non-unidiff file header)
Any insights?
Jan