Re: [PATCH kvm-unit-tests] Add git.orderFile

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

 



2016-12-08 16:39+0100, Andrew Jones:
> It's helpful to have a standard sequence of file types in patches.
> Applying git-diff's orderFile feature allows us to do that. Just
> do 'git config diff.orderFile scripts/git.orderfile' to enable it.
> 
> Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> ---
> This was inspired by Laszlo's patch for QEMU. Anyway it's high time
> somebody posts some good kvm-unit-tests bikeshedding bait!

I raise 10 hours of our lives!

> ---
>  README                |  4 ++++
>  scripts/git.orderfile | 15 +++++++++++++++
>  2 files changed, 19 insertions(+)
>  create mode 100644 scripts/git.orderfile
> 
> diff --git a/README b/README
> index f8f196d90bf1..73fdd526aed7 100644
> --- a/README
> +++ b/README
> @@ -66,3 +66,7 @@ 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 standard sequence of file types in
> +patches. Applying git-diff's orderFile feature allows us to do that.

We already have a standard sequence -- alphabetic order. ;)

I assume the goal is to move the abstract parts to the top of the patch
and minute detail to the bottom, allowing reviewers to understand few
more things on the first read.

> +The orderFile we use is scripts/git.orderfile. Adding the diff.orderFile
> +config (git config diff.orderFile scripts/git.orderfile) will enable it.

The only thing we don't want to be changing afterwards is the file path.

What about scripts/git.order?
The file suffix is pretty obvious and other similar git files don't use
file suffix.  e.g. core.excludeFile -> .gitignore and
core.attributesFile -> .gitattributes.

> diff --git a/scripts/git.orderfile b/scripts/git.orderfile
> new file mode 100644
> index 000000000000..b98a0e78a37e
> --- /dev/null
> +++ b/scripts/git.orderfile
> @@ -0,0 +1,15 @@
> +COPYRIGHT
> +MAINTAINERS
> +*README
> +configure
> +*Makefile*
> +*.mak
> +*.py
> +*.bash
> +*/run
> +*.sh
> +*.cfg
> +*.lds
> +*.h
> +*.S
> +*.c

Let's treat lib/ specially, so the lib/ <-> $arch/ order of hunks
remains the same on all arches.

Whew, this bikeshedding stuff is good ... I plan to apply on Monday, to
let other people have some fun as well.

Thanks.
--
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