[PATCH kvm-unit-tests v2] Add git-diff orderFile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux