kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: me@tobin.cc (Tobin C. Harding)
To: kernelnewbies@lists.kernelnewbies.org
Subject: diff
Date: Mon, 13 Mar 2017 17:57:14 +1100	[thread overview]
Message-ID: <20170313065714.GA654@eros> (raw)

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.

             reply	other threads:[~2017-03-13  6:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13  6:57 Tobin C. Harding [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170313065714.GA654@eros \
    --to=me@tobin.cc \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).