On Wed, 2007-07-18 at 22:09 +0000, Rob Hudson wrote: > After going to a git presentation by Randal Schwartz and watching the > video by Linus on git, I decided to play with it some for a patch I'm > testing in Django. I got git and git-svn installed on my Mac, pulled > down the Django source and started a new branch for the patch I'm > working on. > > What's *really* cool is branches all live in the same directory so you > don't have to change your Python site-packages to point to a new > branch to test, just 'git checkout branch-name' and Django reloads > automatically and you're there. > > What I can't figure out is how to create a nice patch from git to > include into Trac. I tried "git format-patch master" but that outputs > something you'd send in an email. > > I also tried "git diff master" and while this is a lot closer it > prepends "a" and "b" to the to path trees. So you'd then have to use > "patch -p1 < mydiff", which may be what Trac does by default, I'm not > sure.
Trac never applies any patches, so I'm not quite sure what you mean here. The colourising that Trac does is based on reading the patch file (and some content type detection), which happens regardless of the root of the patch. > > Is anyone else doing this? Is there a better way to emit patches from > git? I'd just use "git diff". People create patches from all sorts of random roots (you have no idea how bad it is!), so there's no possibility of applying a patch without actually reading it to see where you have to apply it from. Since you almost always need to specify a "-p" option anyway when applying (omitting it leads to very non-intuitive behaviour), it's not a burden. Regards, Malcolm -- On the other hand, you have different fingers. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
