Skip to content

--diff-opts in config file

Karl Hasselström git 1 version In review

Get series with b4
b4 am 20080124075935.25525.24416.stgit@yoghurt

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Remove unused default valuesstgit/commands/status.py+2 -30 replies
2/4Refactor --diff-opts handlingstgit/commands/diff.py stgit/commands/edit.py stgit/commands/export.py +4 more+32 -570 replies
3/4Let "stg show" use the unified --diff-opts handlingstgit/commands/show.py+4 -90 replies
4/4Read default diff options from the user's configexamples/gitconfig stgit/utils.py+6 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [StGit PATCH 0/4] --diff-opts in config file

This is first two cleanup patches, followed by one patch that makes "stg show" handle diff options like the other commands, and last a patch that reads diff opts from the config file.

The first two patches are in kha/safe, but the latter two are in kha/experimental because -- as Yann pointed out -- it's good to make sure the design is OK before committing to it.

I've solved the problem of overriding the config on the command line by making --diff-opts='--foo --bar' _add_ options, and special-cased --diff-opts='' to clear all options, including those from the config file, since appending no options makes no sense.

We'll still have to consider if and how to support different options for different tools.

Oh, and Jon: is this what you wanted, by the way? :-)

---

Karl Hasselström (4):
Read default diff options from the user's config Let "stg show" use the unified --diff-opts handling Refactor --diff-opts handling
Remove unused default values

 examples/gitconfig       |    4 ++++
 stgit/commands/diff.py   |   14 ++++----------
 stgit/commands/edit.py   |   14 +++-----------
 stgit/commands/export.py |   12 +++---------
 stgit/commands/files.py  |   13 ++++---------
 stgit/commands/mail.py   |   12 +++---------
 stgit/commands/show.py   |   13 ++++---------
 stgit/commands/status.py |   17 +++++------------
 stgit/utils.py           |   13 +++++++++++++
 9 files changed, 43 insertions(+), 69 deletions(-)
Signature · 2 lines
Karl Hasselström, [email protected]
      www.treskal.com/kalle