Skip to content

nd/diff-parseopt part 1

Nguyễn Thái Ngọc Duy git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14parse-options.h: remove extern on function prototypesparse-options.h+29 -290 replies
2/14parse-options: add one-shot modeparse-options.c parse-options.h+35 -80 replies
3/14parse-options: disable option abbreviation with PARSE_OPT_KEEP_UNKNOWNparse-options.c t/t7800-difftool.sh+4 -30 replies
4/14parse-options: add OPT_BITOP()parse-options.c parse-options.h+12 -00 replies
5/14parse-options: stop abusing 'callback' for lowlevel callbacksbuiltin/blame.c builtin/merge.c builtin/update-index.c +3 more+32 -130 replies
6/14parse-options: avoid magic return codesbuiltin/merge.c builtin/update-index.c parse-options-cb.c +2 more+68 -460 replies
7/14parse-options: allow ll_callback with OPTION_CALLBACKbuiltin/merge.c builtin/update-index.c parse-options-cb.c +2 more+51 -223 replies
8/14diff.h: keep forward struct declarations sorteddiff.h+6 -60 replies
9/14diff.h: avoid bit fields in struct diff_flagsdiff.h+33 -330 replies
10/14diff.c: prepare to use parse_options() for parsingdiff.c diff.h+29 -00 replies
11/14diff.c: convert -u|-p|--patchdiff.c+8 -20 replies
12/14diff.c: convert -U|--unifiedDocumentation/diff-options.txt diff.c parse-options.h+24 -60 replies
13/14diff.c: convert -W|--[no-]function-contextdiff.c+2 -60 replies
14/14diff.c: convert --rawdiff.c+4 -30 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/14] nd/diff-parseopt part 1

This is the first part of converting diff_opt_parse() to use parse_options(). Compared to the full series [1] I sent earlier, 03/76 is dropped and 02/14 is updated to allow KEEP_UNKNOWN and STOP_AT_NON_OPTION combination, but only for one shot mode.

[1] https://public-inbox.org/git/[email protected]/

Nguyễn Thái Ngọc Duy (14):
parse-options.h: remove extern on function prototypes
parse-options: add one-shot mode
parse-options: disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN
parse-options: add OPT_BITOP()
parse-options: stop abusing 'callback' for lowlevel callbacks
parse-options: avoid magic return codes
parse-options: allow ll_callback with OPTION_CALLBACK diff.h: keep forward struct declarations sorted
diff.h: avoid bit fields in struct diff_flags
diff.c: prepare to use parse_options() for parsing

  diff.c: convert -u|-p|--patch
  diff.c: convert -U|--unified
  diff.c: convert -W|--[no-]function-context

diff.c: convert --raw

 Documentation/diff-options.txt |   2 +-
 builtin/blame.c                |   2 +-
 builtin/merge.c                |   9 +-
 builtin/update-index.c         |  41 +++++----
 diff.c                         |  71 ++++++++++++---
 diff.h                         |  80 ++++++++---------
 parse-options-cb.c             |   7 +-
 parse-options.c                | 152 ++++++++++++++++++++++++---------
 parse-options.h                | 108 +++++++++++++----------
 t/t7800-difftool.sh            |   4 +-
 10 files changed, 318 insertions(+), 158 deletions(-)
Signature · 1 line
2.20.1.560.g70ca8b83ee