Skip to content

more unused parameter cleanups

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13revision: drop some unused "revs" parametersrevision.c+6 -60 replies
2/13log: drop unused rev_info from early outputbuiltin/log.c+5 -50 replies
3/13log: drop unused "len" from show_tagger()builtin/log.c+4 -40 replies
4/13update-index: drop unused prefix_length parameter from do_reupdate()builtin/update-index.c+2 -30 replies
5/13test-date: drop unused "now" parameter from parse_dates()t/helper/test-date.c+2 -20 replies
6/13unpack-trees: drop name_entry from traverse_by_cache_tree()unpack-trees.c+1 -20 replies
7/13unpack-trees: drop unused error_type parametersunpack-trees.c+2 -40 replies
8/13report_path_error(): drop unused prefix parameterbuiltin/checkout.c builtin/commit.c builtin/ls-files.c +3 more+8 -90 replies
9/13fetch_pack(): drop unused parametersbuiltin/fetch-pack.c fetch-pack.c fetch-pack.h +1 more+7 -110 replies
10/13parse-options: drop unused ctx parameter from show_gitcomp()parse-options.c+2 -30 replies
11/13pretty: drop unused "type" parameter in needs_rfc2047_encoding()pretty.c+3 -40 replies
12/13pretty: drop unused strbuf from parse_padding_placeholder()pretty.c+2 -30 replies
13/13parse_opt_ref_sorting: always use with NONEG flagbuiltin/branch.c builtin/for-each-ref.c builtin/ls-remote.c +3 more+16 -102 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/13] more unused parameter cleanups

Here's another round of -Wunused-parameter cleanups. Previous rounds were at [1] and [2]. As before, these are mostly just removals, so it's easy to see there's no behavior change (there are a couple of cleanups that ride along, though, so watch for those).

There are two minor conflicts when merging with pu:

- jt/fetch-cdn-offload tweaked the "pack_lockfile" parameter to fetch_pack(). A few other parameters are dropped in this series. The textual resolution is pretty straightforward.

- ps/stash-in-c (et al) added a new call to report_path_error() in builtin/stash.c, which here loses its redundant "prefix" parameter. There's no textual conflict, but the new call needs to drop its final NULL parameter in order to compile.

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

The patches are:

[01/13]: revision: drop some unused "revs" parameters
[02/13]: log: drop unused rev_info from early output
[03/13]: log: drop unused "len" from show_tagger()
[04/13]: update-index: drop unused prefix_length parameter from do_reupdate() [05/13]: test-date: drop unused "now" parameter from parse_dates() [06/13]: unpack-trees: drop name_entry from traverse_by_cache_tree() [07/13]: unpack-trees: drop unused error_type parameters [08/13]: report_path_error(): drop unused prefix parameter [09/13]: fetch_pack(): drop unused parameters
[10/13]: parse-options: drop unused ctx parameter from show_gitcomp() [11/13]: pretty: drop unused "type" parameter in needs_rfc2047_encoding() [12/13]: pretty: drop unused strbuf from parse_padding_placeholder() [13/13]: parse_opt_ref_sorting: always use with NONEG flag

 builtin/branch.c            |  3 +--
 builtin/checkout.c          |  2 +-
 builtin/commit.c            |  6 +++---
 builtin/fetch-pack.c        |  2 +-
 builtin/for-each-ref.c      |  3 +--
 builtin/log.c               | 18 +++++++++---------
 builtin/ls-files.c          |  2 +-
 builtin/ls-remote.c         |  3 +--
 builtin/submodule--helper.c |  2 +-
 builtin/tag.c               |  3 +--
 builtin/update-index.c      |  5 ++---
 dir.c                       |  3 +--
 dir.h                       |  2 +-
 fetch-pack.c                |  3 +--
 fetch-pack.h                |  3 +--
 parse-options.c             |  5 ++---
 pretty.c                    | 12 +++++-------
 ref-filter.c                |  9 +++++++--
 ref-filter.h                |  5 +++++
 revision.c                  | 12 ++++++------
 t/helper/test-date.c        |  4 ++--
 transport.c                 | 10 ++++------
 unpack-trees.c              |  9 +++------
 23 files changed, 60 insertions(+), 66 deletions(-)

-Peff