Please post real patches (Was: [gui][patch] fix jcomponent action reset)

Andrew Haley aph@redhat.com
Mon Sep 6 21:50:00 GMT 2004


Mark Wielaard writes:

 > 
 > Please don't post patches like this if it is not absolutely necessary or
 > at least add a big comment to the patch that it is not the real patch!
 > 
 > >    public void resetKeyboardActions()
 > >    {
 > > +    if (inputMap_whenFocused != null)
 > >      inputMap_whenFocused.clear();
 > > +    if (inputMap_whenAncestorOfFocused != null)
 > >      inputMap_whenAncestorOfFocused.clear();
 > > +    if (inputMap_whenInFocusedWindow != null)
 > >      inputMap_whenInFocusedWindow.clear();
 > > +    if (actionMap != null)
 > >      actionMap.clear();
 > >    }
 > 
 > That is not the patch you are actually committing to the tree!
 > Somehow all white space got stripped. That makes applying the patch
 > either impossible or leads to the wrong result in the tree.
 > 
 > Having patches in this format makes merging these changes into another
 > branch or to/from GNU Classpath really hard. In the best case miss some
 > of the indentation, or I use other indentation than the patch submitter.
 > In the worst case it doesn't apply and I have to hunt down some remote
 > code repository to get the actualy patch or do the merge completely by
 > hand.
 > 
 > Please just post what you commit and not some approximation.

FWIW, I prefer the form without whitespace diffs for patch approval.
It's vastly easier to see what has been changed.

Really, this is a matter of what the patch is for.

Andrew.



More information about the Java-patches mailing list