summaryrefslogtreecommitdiff
path: root/walker.c
diff options
context:
space:
mode:
Diffstat (limited to 'walker.c')
-rw-r--r--walker.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/walker.c b/walker.c
index 7b7e72b..2c86e40 100644
--- a/walker.c
+++ b/walker.c
@@ -9,10 +9,14 @@
static unsigned char current_commit_sha1[20];
-void walker_say(struct walker *walker, const char *fmt, const char *hex)
+void walker_say(struct walker *walker, const char *fmt, ...)
{
- if (walker->get_verbosely)
- fprintf(stderr, fmt, hex);
+ if (walker->get_verbosely) {
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ }
}
static void report_missing(const struct object *obj)
@@ -43,12 +47,12 @@ static int process_tree(struct walker *walker, struct tree *tree)
if (S_ISGITLINK(entry.mode))
continue;
if (S_ISDIR(entry.mode)) {
- struct tree *tree = lookup_tree(entry.sha1);
+ struct tree *tree = lookup_tree(entry.oid->hash);
if (tree)
obj = &tree->object;
}
else {
- struct blob *blob = lookup_blob(entry.sha1);
+ struct blob *blob = lookup_blob(entry.oid->hash);
if (blob)
obj = &blob->object;
}
@@ -220,7 +224,7 @@ int walker_targets_stdin(char ***target, const char ***write_ref)
char *rf_one = NULL;
char *tg_one;
- if (strbuf_getline(&buf, stdin, '\n') == EOF)
+ if (strbuf_getline_lf(&buf, stdin) == EOF)
break;
tg_one = buf.buf;
rf_one = strchr(tg_one, '\t');