Re: Creating CVS-style patch headers with git-diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



8 jan 2011 kl. 12:23 skrev David Chanters:

> Hi all,
> 
> [ Please Cc me on any replies as I am not subscribed to this list, thanks. ]
> 
> I am wondering if I can get git diff to create "CVS-style patches"?
> What do I mean by that?  Well, whenever I do:
> 
> git diff
> 
> I get patch headers in the form:
> 
> diff --git a/foo.c b/foo.c
> index 57b9527..a2d947b 100644
> --- a/foo.c
> +++ b/foo.c
> 
> This is fine for git, but if I then want to import the same patch into
> CVS I have to either edit the patch, or mess around with the -p option
> to patch(1).
> 
Adding -p1 is not what I'd call "mess around". It is pretty standard
use with patch since most patches has en extra directory level anyway. I
think that's why git has those a/ b/ prefixes by default.

Have you tries git cvsexportcommit? It is by far the easiest way of exporting
from git to CVS.

-- robin


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]