Description of problem: git format-patch --help documents: -O<orderfile> Control the order in which files appear in the output. This overrides the diff.orderFile configuration variable (see git- config(1)). To cancel diff.orderFile, use -O/dev/null. but while -O works on the command line, the configuration option does NOT work (which is particularly annoying when what I see via 'git log' does not translate into what I send with 'git send-email'). Version-Release number of selected component (if applicable): git-2.24.1-1.fc31.x86_64 How reproducible: 100% Steps to Reproduce: 1. $ mkdir -p /tmp/proj $ cd /tmp/proj $ git init $ printf '%s\n' '*.h' '*.c' > git.orderfile $ git config diff.orderfile git.orderfile $ echo c > a.c $ echo h > a.h $ git add a.* $ git diff --cached # Yay, a.h lists before a.c $ git commit -m 'placeholder' $ git format-patch -1 --stdout $ git format-patch -1 --stdout -Ogit.orderfile Actual results: the last two commands produce different output (the first outputs .c before .h) Expected results: The command should honor the documented config setting without me having to supply explicit -O. Additional info:
Thanks for the detailed reproduction recipe Eric! This looks like it was broken in 13cdf78094 (format-patch: teach format.notes config option, 2019-05-16) which was first released in 2.23.0. It was subsequently fixed in 09ac67a183 (format-patch: move git_config() before repo_init_revisions(), 2019-12-09) which was released in 2.25.0. It's probably about time to push 2.25.1 to f31. I have 2.25.1 built in the @git-maint/git copr if you'd like to test that sooner.
Confirmed that the copr 2.25.1 build fixes the problem. Thanks for the fast response!
FEDORA-2020-f87c04bad1 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f87c04bad1
Sorry for the slight lag in pushing this update. I was hoping that a patch for bug#1791810 might come out of Ondrej's post on the git list. Eric, thanks for the many, many interesting bits of shell and general knowledge I've picked up from your posts on various lists over a lot of years! I couldn't tell you how often I've picked up something very useful from your messages.
git-2.25.1-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f87c04bad1
git-2.25.1-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.