diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-07-25 14:13:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-25 14:13:44 -0700 |
commit | 9db397978416f9d562a94e55db86c7a45210a05c (patch) | |
tree | 7229b749a1f9eefe19a522fe5a5b4d0f18bea8b2 /fsck.h | |
parent | 3cc75c10d781572a073d7dbff4e1695b93a89d48 (diff) | |
parent | 90cf590f53f2939a47ca7b397e270e8228699829 (diff) | |
download | git-9db397978416f9d562a94e55db86c7a45210a05c.tar.gz |
Merge branch 'js/fsck-name-object'
When "git fsck" reports a broken link (e.g. a tree object contains
a blob that does not exist), both containing object and the object
that is referred to were reported with their 40-hex object names.
The command learned the "--name-objects" option to show the path to
the containing object from existing refs (e.g. "HEAD~24^2:file.txt").
* js/fsck-name-object:
fsck: optionally show more helpful info for broken links
fsck: give the error function a chance to see the fsck_options
fsck_walk(): optionally name objects on the go
fsck: refactor how to describe objects
Diffstat (limited to 'fsck.h')
-rw-r--r-- | fsck.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -23,9 +23,11 @@ int is_valid_msg_type(const char *msg_id, const char *msg_type); typedef int (*fsck_walk_func)(struct object *obj, int type, void *data, struct fsck_options *options); /* callback for fsck_object, type is FSCK_ERROR or FSCK_WARN */ -typedef int (*fsck_error)(struct object *obj, int type, const char *message); +typedef int (*fsck_error)(struct fsck_options *o, + struct object *obj, int type, const char *message); -int fsck_error_function(struct object *obj, int type, const char *message); +int fsck_error_function(struct fsck_options *o, + struct object *obj, int type, const char *message); struct fsck_options { fsck_walk_func walk; @@ -33,6 +35,7 @@ struct fsck_options { unsigned strict:1; int *msg_type; struct sha1_array *skiplist; + struct decoration *object_names; }; #define FSCK_OPTIONS_DEFAULT { NULL, fsck_error_function, 0, NULL } |