From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: [PATCH kvm-unit-tests v2] Add git-diff orderFile Date: Mon, 12 Dec 2016 15:08:53 +0100 Message-ID: <20161212140853.5061-1-drjones@redhat.com> Cc: rkrcmar@redhat.com, pbonzini@redhat.com, lvivier@redhat.com, thuth@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37126 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751774AbcLLOI5 (ORCPT ); Mon, 12 Dec 2016 09:08:57 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 796BC8B120 for ; Mon, 12 Dec 2016 14:08:57 +0000 (UTC) Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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