On Fri, 16 Jul 2010, Ben Greear wrote:
>> I saw them with 'git diff' when having applied the patch locally, and I
>> tend to use emacs' show-trailing-whitespace feature for that (combined with
>> my code-cleanup function that removes them for me).
>
> I use xemacs, so if you have a snippet handy for posting, I'll give it a
> try.
OK, it's a little bit off-topic but let me share some emacs tricks I use:
show-trailing-whitespace is a local emacs variable, so if you set it (to non
nil I believe), it will show trailing whitespace in the editor.
To clean up, I have this:
(defun curl-code-cleanup ()
"no docs"
(interactive)
(untabify (point-min) (point-max))
(delete-trailing-whitespace)
)
and when I enable curl-mode, which I make my editor do by default when I load
files (as I use specific other modes for projects that use other styles), I
have my emacs do this:
(define-key c-mode-base-map "\M-m" 'curl-code-cleanup)
... so that I can use Meta-m to automatically clean up tabs and trailing
whitespace in my c-ares (or curl) source codes.
> I just pushed my changes to my github c-ares fork. Do you want to get it
> from there directly, or have me generate one big patch, or some other way?
>
> I can't easily use git-mail to format one big patch as I have 3 commits in
> my tree (or, at least I don't know how to make it combine that into one
> commit w/out manually doing that in a clean tree).
I'm not sure I understand exactly. If you want to make one patch of multiple
commits, you can do that with
$ git format-patch [since commit id]
and it'll make a single patch for you, suitable to send away.
I prefer having patches posted here, for archiving and for others to better
track exactly what goes in but if you think it'll work better for you if I
pull directly from your github repo then I'm willing to do so.
-- / daniel.haxx.seReceived on 2010-07-17