All of lore.kernel.org
 help / color / mirror / Atom feed
* diff
@ 2017-03-13  6:57 Tobin C. Harding
  2017-03-13  7:34 ` diff Greg KH
  2017-03-13  7:43 ` diff Nicholas Mc Guire
  0 siblings, 2 replies; 4+ messages in thread
From: Tobin C. Harding @ 2017-03-13  6:57 UTC (permalink / raw)
  To: kernelnewbies

On occasions diff output does not render the same as it does when
editing a file. For example, while removing checkpatch tab warning
the following diff was generated

-#define KS_WLAN_SET_WPS_ENABLE                 SIOCIWFIRSTPRIV + 4
-#define KS_WLAN_GET_WPS_ENABLE                 SIOCIWFIRSTPRIV + 5
+#define KS_WLAN_SET_WPS_ENABLE         SIOCIWFIRSTPRIV + 4
+#define KS_WLAN_GET_WPS_ENABLE         SIOCIWFIRSTPRIV + 5

However when editing the file the alignment was not changed, just tabs
were inserted instead of spaces.

I had the same thing happen a few days ago (reproduced here from
memory)

-static void foo(struct bar *barp, struct baz *bazp)
+static void foo(struct bar *barp,
+               struct baz *bazp)
{
        ...

When editing the file the two s's in struct were aligned but not in
the diff output. I reapplied this patch to a clean tree and it applied
correctly.

How do maintainers visually parse this if the output is not identical in the
diff and the file once applied?

thanks,
Tobin.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-13  8:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-13  6:57 diff Tobin C. Harding
2017-03-13  7:34 ` diff Greg KH
2017-03-13  7:43 ` diff Nicholas Mc Guire
2017-03-13  8:20   ` diff Tobin C. Harding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.