From: Andrew Jones <drjones@redhat.com>
To: kvm@vger.kernel.org
Cc: rkrcmar@redhat.com, pbonzini@redhat.com, lvivier@redhat.com,
thuth@redhat.com
Subject: [PATCH kvm-unit-tests v2] Add git-diff orderFile
Date: Mon, 12 Dec 2016 15:08:53 +0100 [thread overview]
Message-ID: <20161212140853.5061-1-drjones@redhat.com> (raw)
It's helpful to have a common order of file types in patches.
Applying git-diff's orderFile feature allows us to do that. Just
do 'git config diff.orderFile scripts/git.difforder' to enable it.
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
v2 changed the file name and forces common (lib/) before unit
test code. Rearranged some other stuff too; now the approach
is docs, running, building, common-lib/arch-lib (can't force
common-lib to be first), unit-test, unittests.cfg, and, as
much as possible, helpers before users and headers before code.
---
README | 6 ++++++
scripts/git.difforder | 25 +++++++++++++++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 scripts/git.difforder
diff --git a/README b/README
index f8f196d90bf1..3240b952f97c 100644
--- a/README
+++ b/README
@@ -66,3 +66,9 @@ You can add the following to .git/config to do this automatically for you:
[format]
subjectprefix = kvm-unit-tests PATCH
+Additionally it's helpful to have a common order of file types in patches.
+Our chosen order attempts to place the more declarative files before
+the code files. We also start with common code and finish with unit test
+code. git-diff's orderFile feature allows us to specify the order in a
+file. The orderFile we use is scripts/git.difforder. Adding the config
+with 'git config diff.orderFile scripts/git.difforder' enables it.
diff --git a/scripts/git.difforder b/scripts/git.difforder
new file mode 100644
index 000000000000..ef493220831d
--- /dev/null
+++ b/scripts/git.difforder
@@ -0,0 +1,25 @@
+COPYRIGHT
+MAINTAINERS
+*README
+scripts/*.mak
+scripts/*.py
+scripts/*.bash
+scripts/*.sh
+scripts/*
+*/run
+run_tests.sh
+configure
+*Makefile*
+*.mak
+lib/*.lds
+lib/linux/*
+lib/asm-generic/*
+lib/*/asm/*
+lib/*.h
+lib/*.S
+lib/*.c
+*.lds
+*.h
+*.S
+*.c
+*.cfg
--
2.9.3
next reply other threads:[~2016-12-12 14:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 14:08 Andrew Jones [this message]
2016-12-13 16:06 ` [PATCH kvm-unit-tests v2] Add git-diff orderFile Radim Krčmář
2017-01-12 12:16 ` Paolo Bonzini
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=20161212140853.5061-1-drjones@redhat.com \
--to=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=thuth@redhat.com \
/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