[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: [PATCH v5 12/18] tree.h: format argument lists of read_tree() users
From: Ævar Arnfjörð Bjarmason <avarab () gmail ! com>
Date: 2021-03-31 19:09:40
Message-ID: patch-12.19-960e15bc7d5-20210331T190531Z-avarab () gmail ! com
[Download RAW message or body]
Re-indent and format the argument list of read_tree() callbacks, and
the relevant functions they call.
This is a whitespace-only change to make changes in a later series
easier to read. In that series I'll be adding a new argument on the
"mode" line, so leave space on it for a new argument.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
archive.c | 13 ++++++++-----
builtin/checkout.c | 4 +++-
builtin/log.c | 5 +++--
builtin/ls-tree.c | 4 +++-
merge-recursive.c | 3 ++-
tree.h | 5 ++++-
6 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/archive.c b/archive.c
index 295615580d7..6af35a66b56 100644
--- a/archive.c
+++ b/archive.c
@@ -134,8 +134,9 @@ static int check_attr_export_subst(const struct attr_check \
*check) }
static int write_archive_entry(const struct object_id *oid, const char *base,
- int baselen, const char *filename, unsigned mode,
- void *context)
+ int baselen, const char *filename,
+ unsigned mode,
+ void *context)
{
static struct strbuf path = STRBUF_INIT;
struct archiver_context *c = context;
@@ -225,8 +226,9 @@ static int write_directory(struct archiver_context *c)
}
static int queue_or_write_archive_entry(const struct object_id *oid,
- struct strbuf *base, const char *filename,
- unsigned mode, void *context)
+ struct strbuf *base, const char *filename,
+ unsigned mode,
+ void *context)
{
struct archiver_context *c = context;
@@ -372,7 +374,8 @@ struct path_exists_context {
};
static int reject_entry(const struct object_id *oid, struct strbuf *base,
- const char *filename, unsigned mode,
+ const char *filename,
+ unsigned mode,
void *context)
{
int ret = -1;
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 0e663905200..0887352db2a 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -114,7 +114,9 @@ static int post_checkout_hook(struct commit *old_commit, struct \
commit *new_comm }
static int update_some(const struct object_id *oid, struct strbuf *base,
- const char *pathname, unsigned mode, void *context)
+ const char *pathname,
+ unsigned mode,
+ void *context)
{
int len;
struct cache_entry *ce;
diff --git a/builtin/log.c b/builtin/log.c
index 980de590638..b7b76856a9f 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -598,8 +598,9 @@ static int show_tag_object(const struct object_id *oid, struct \
rev_info *rev) }
static int show_tree_object(const struct object_id *oid,
- struct strbuf *base,
- const char *pathname, unsigned mode, void *context)
+ struct strbuf *base, const char *pathname,
+ unsigned mode,
+ void *context)
{
FILE *file = context;
fprintf(file, "%s%s\n", pathname, S_ISDIR(mode) ? "/" : "");
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index 3a442631c71..8d5c3fd0582 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -62,7 +62,9 @@ static int show_recursive(const char *base, int baselen, const char \
*pathname) }
static int show_tree(const struct object_id *oid, struct strbuf *base,
- const char *pathname, unsigned mode, void *context)
+ const char *pathname,
+ unsigned mode,
+ void *context)
{
int retval = 0;
int baselen;
diff --git a/merge-recursive.c b/merge-recursive.c
index 97520a88646..57198b29fe7 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -453,7 +453,8 @@ static void unpack_trees_finish(struct merge_options *opt)
static int save_files_dirs(const struct object_id *oid,
struct strbuf *base, const char *path,
- unsigned int mode, void *context)
+ unsigned int mode,
+ void *context)
{
struct path_hashmap_entry *entry;
int baselen = base->len;
diff --git a/tree.h b/tree.h
index 6efff003e21..10c8637ab3e 100644
--- a/tree.h
+++ b/tree.h
@@ -31,7 +31,10 @@ struct tree *parse_tree_indirect(const struct object_id *oid);
int cmp_cache_name_compare(const void *a_, const void *b_);
#define READ_TREE_RECURSIVE 1
-typedef int (*read_tree_fn_t)(const struct object_id *, struct strbuf *, const char \
*, unsigned int, void *); +typedef int (*read_tree_fn_t)(const struct object_id *, \
struct strbuf *, + const char *,
+ unsigned int,
+ void *);
int read_tree_at(struct repository *r,
struct tree *tree, struct strbuf *base,
--
2.31.1.474.g72d45d12706
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic