3 ms·
I was not aware of the `git config` option for wrapping long files, worth the price of admission just for that for me. Edit: there's a `git diff` tip in there,
by nicholassmith 14y ago
I was not aware of the `git config` option for wrapping long files, worth the price of admission just for that for me.
Edit: there's a `git diff` tip in there, but this comes up a few times so if anyone needs to do patches from git for svn repos do `git patch --prefix=none $DIFF1 $DIFF2 > some.patch` share and apply with `patch -p0 < some.patch`.
- spicyj 14y agoOr just: git diff REV1 REV2 >some.patch patch -p1 <some.patch
- nicholassmith 14y agoI found when I was doing that it would occasionally cause problems with applying in svn properly, but YMMV. I've seen some really over the top solutions to it as well.
- tedchs 14y agoI don't see that Git has a "patch" command, but svn does -- is that what you meant here? Where you have "git patch", did you maybe mean: git diff --no-prefix $OLD $NEW ...where $OLD and $NEW are the two commits you want to diff.
- nicholassmith 14y agoYeah, my bad!
- JoshTriplett 14y agoRather than setting git's pager to less with options, just export the "LESS" environment variable with options you want less to use everywhere.