From: Timur Tabi <timur@freescale.com>
To: git@vger.kernel.org
Subject: How do I get git-format-patch to ignore changes that remove spaces from the end of the line?
Date: Tue, 13 Feb 2007 15:59:33 -0600 [thread overview]
Message-ID: <45D234C5.5090005@freescale.com> (raw)
I have configured my text editor to remove spaces at the end of each line
whenever it saves a file. I do this so that I don't inadvertently add spaces to
the end of any line.
Unfortunately, if the file *already* had spaces at the end of some lines before
I start editing it, this spaces will also be removed.
After I commit my changes, I use git-format-patch to make a patch. I then get
deltas like this:
* Copyright (C) 1996-2005 Paul Mackerras.
- *
+ *
* Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner.
- * {engebret|bergner}@us.ibm.com
+ * {engebret|bergner}@us.ibm.com
*
I don't want these deltas in my patch. However, if I specify an option like
--ignore-all-space, git-format-patch omits deltas like this one:
- memcpy(fs_enet_data.macaddr, mac_addr, 6);
+ memcpy(fs_enet_data.macaddr, mac_addr, 6);
In this case, I *do* want the delta, because I'm indenting a line to fix a
formatting error.
So how do I get the output that I want, and not the output that I don't want?
--
Timur Tabi
Linux Kernel Developer @ Freescale
next reply other threads:[~2007-02-13 21:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-13 21:59 Timur Tabi [this message]
2007-02-13 22:24 ` How do I get git-format-patch to ignore changes that remove spaces from the end of the line? Junio C Hamano
2007-02-13 22:36 ` Timur Tabi
2007-02-14 0:30 ` [PATCH] teach diff machinery about --ignore-space-at-eol Johannes Schindelin
2007-02-14 5:28 ` Timur Tabi
2007-02-14 17:18 ` Timur Tabi
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=45D234C5.5090005@freescale.com \
--to=timur@freescale.com \
--cc=git@vger.kernel.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 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.