Skip to content

Commit ff5f5f2

Browse files
mhaggergitster
authored andcommitted
revision: split some overly-long lines
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5b1e14e commit ff5f5f2

2 files changed

Lines changed: 35 additions & 17 deletions

File tree

revision.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ static int show_path_truncated(FILE *out, const struct name_path *path)
7070
return ours || emitted;
7171
}
7272

73-
void show_object_with_name(FILE *out, struct object *obj, const struct name_path *path, const char *component)
73+
void show_object_with_name(FILE *out, struct object *obj,
74+
const struct name_path *path, const char *component)
7475
{
7576
struct name_path leaf;
7677
leaf.up = (struct name_path *)path;
@@ -186,7 +187,9 @@ void mark_parents_uninteresting(struct commit *commit)
186187
}
187188
}
188189

189-
static void add_pending_object_with_mode(struct rev_info *revs, struct object *obj, const char *name, unsigned mode)
190+
static void add_pending_object_with_mode(struct rev_info *revs,
191+
struct object *obj,
192+
const char *name, unsigned mode)
190193
{
191194
if (!obj)
192195
return;
@@ -209,7 +212,8 @@ static void add_pending_object_with_mode(struct rev_info *revs, struct object *o
209212
add_object_array_with_mode(obj, name, &revs->pending, mode);
210213
}
211214

212-
void add_pending_object(struct rev_info *revs, struct object *obj, const char *name)
215+
void add_pending_object(struct rev_info *revs,
216+
struct object *obj, const char *name)
213217
{
214218
add_pending_object_with_mode(revs, obj, name, S_IFINVALID);
215219
}
@@ -226,7 +230,9 @@ void add_head_to_pending(struct rev_info *revs)
226230
add_pending_object(revs, obj, "HEAD");
227231
}
228232

229-
static struct object *get_reference(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags)
233+
static struct object *get_reference(struct rev_info *revs, const char *name,
234+
const unsigned char *sha1,
235+
unsigned int flags)
230236
{
231237
struct object *object;
232238

@@ -247,7 +253,8 @@ void add_pending_sha1(struct rev_info *revs, const char *name,
247253
add_pending_object(revs, object, name);
248254
}
249255

250-
static struct commit *handle_commit(struct rev_info *revs, struct object *object, const char *name)
256+
static struct commit *handle_commit(struct rev_info *revs,
257+
struct object *object, const char *name)
251258
{
252259
unsigned long flags = object->flags;
253260

@@ -368,7 +375,8 @@ static void file_change(struct diff_options *options,
368375
DIFF_OPT_SET(options, HAS_CHANGES);
369376
}
370377

371-
static int rev_compare_tree(struct rev_info *revs, struct commit *parent, struct commit *commit)
378+
static int rev_compare_tree(struct rev_info *revs,
379+
struct commit *parent, struct commit *commit)
372380
{
373381
struct tree *t1 = parent->tree;
374382
struct tree *t2 = commit->tree;

revision.h

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,19 +195,23 @@ struct setup_revision_opt {
195195
};
196196

197197
extern void init_revisions(struct rev_info *revs, const char *prefix);
198-
extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct setup_revision_opt *);
198+
extern int setup_revisions(int argc, const char **argv, struct rev_info *revs,
199+
struct setup_revision_opt *);
199200
extern void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,
200-
const struct option *options,
201-
const char * const usagestr[]);
201+
const struct option *options,
202+
const char * const usagestr[]);
202203
#define REVARG_CANNOT_BE_FILENAME 01
203204
#define REVARG_COMMITTISH 02
204-
extern int handle_revision_arg(const char *arg, struct rev_info *revs, int flags, unsigned revarg_opt);
205+
extern int handle_revision_arg(const char *arg, struct rev_info *revs,
206+
int flags, unsigned revarg_opt);
205207

206208
extern void reset_revision_walk(void);
207209
extern int prepare_revision_walk(struct rev_info *revs);
208210
extern struct commit *get_revision(struct rev_info *revs);
209-
extern char *get_revision_mark(const struct rev_info *revs, const struct commit *commit);
210-
extern void put_revision_mark(const struct rev_info *revs, const struct commit *commit);
211+
extern char *get_revision_mark(const struct rev_info *revs,
212+
const struct commit *commit);
213+
extern void put_revision_mark(const struct rev_info *revs,
214+
const struct commit *commit);
211215

212216
extern void mark_parents_uninteresting(struct commit *commit);
213217
extern void mark_tree_uninteresting(struct tree *tree);
@@ -220,15 +224,19 @@ struct name_path {
220224

221225
char *path_name(const struct name_path *path, const char *name);
222226

223-
extern void show_object_with_name(FILE *, struct object *, const struct name_path *, const char *);
227+
extern void show_object_with_name(FILE *, struct object *,
228+
const struct name_path *, const char *);
224229

225230
extern void add_object(struct object *obj,
226231
struct object_array *p,
227232
struct name_path *path,
228233
const char *name);
229234

230-
extern void add_pending_object(struct rev_info *revs, struct object *obj, const char *name);
231-
extern void add_pending_sha1(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags);
235+
extern void add_pending_object(struct rev_info *revs,
236+
struct object *obj, const char *name);
237+
extern void add_pending_sha1(struct rev_info *revs,
238+
const char *name, const unsigned char *sha1,
239+
unsigned int flags);
232240

233241
extern void add_head_to_pending(struct rev_info *);
234242

@@ -238,7 +246,9 @@ enum commit_action {
238246
commit_error
239247
};
240248

241-
extern enum commit_action get_commit_action(struct rev_info *revs, struct commit *commit);
242-
extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit);
249+
extern enum commit_action get_commit_action(struct rev_info *revs,
250+
struct commit *commit);
251+
extern enum commit_action simplify_commit(struct rev_info *revs,
252+
struct commit *commit);
243253

244254
#endif

0 commit comments

Comments
 (0)