On 11/30/16 13:29, Gerd Hoffmann wrote: > Hi, > >>> Want sent a patch? >> >> What file for? :) > > create something like scripts/git.orderfile, so people have just to run > "git config diff.orderfile scripts/git.orderfile" to enable it, and we > can refine the config without having everybody update the orderfile > manually?
Good idea -- I didn't expect this to work, but it actually does. The -O command line option interprets a relative pathname relative to the working directory. However, if you place a relative pathname in diff.orderFile in .git/config, then git will look for the order file relative to the project root directory, not relative to your working directory (which could be any subdirectory of the project root directory). > >> I've considered modifying >> <http://wiki.qemu.org/Contribute/SubmitAPatch>, but that article is >> humongous already. >> >> Nonetheless, section "Make code motion patches easy to review" mentions >> some diff.* settings, so I guess a new section after it ("Format >> declarative and abstract changes near the top") would be appropriate, if >> there's no disagreement. > > Yep, adding to the wiki sounds good too. > >>> Can this be automatically enabled per repo, like .gitignore, so it works >>> without everybody tweaking its local git config? >> >> Not to my understanding. > > Too bad. I think recommending a simple git config command in the wiki, like you write above, should be fine. I guess I'll add this item (the patch and the wiki update) to my todo list... :) Thanks Laszlo