Add git-diff orderFile
PATCH v2 1/1 Add git-diff orderFile
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.
---
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
README +6 -0
@@ -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.
scripts/git.difforder new file +25 -0
@@ -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
Signature · 1 line
2.9.3
2016-12-12 15:08+0100, Andrew Jones:
Quoted 11 lines
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 <[email protected]>---
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.
(While burning the pile of review notes I prepared for v2 through v9;
v9 would ask for a checkpatch script to verify the order. ;])
Quoted 13 lines · Radim Krčmář
2016-12-12 15:08+0100, Andrew Jones:
Quoted 11 lines
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 <[email protected]>---
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.
Quoted 5 lines
Acked-by Radim Krčmář <[email protected]>(While burning the pile of review notes I prepared for v2 through v9;
v9 would ask for a checkpatch script to verify the order. ;])
Applied, thanks.
Paolo