commit - 987345dd45ca55631b6ff88fcb12f1169d8f2671
commit + 39beb6da7e0fdf984335836206ffebcefb9792dc
blob - 0e62e71ac79879c8427c88f483ad9505a3d27f18
blob + 9d87a000a88569e1c309efb8b20347a2ba1ca0d4
--- lib/fileindex.c
+++ lib/fileindex.c
}
static const struct got_error *
-diff_fileindex_dir(struct got_fileindex *, struct got_fileindex_entry **, DIR *,
+diff_fileindex_dir(struct got_fileindex *, struct got_fileindex_entry **,
struct got_pathlist_head *, const char *, const char *,
struct got_repository *, struct got_fileindex_diff_dir_cb *, void *);
static const struct got_error *
walk_dir(struct got_pathlist_entry **next, struct got_fileindex *fileindex,
struct got_fileindex_entry **ie, struct got_pathlist_entry *dle,
- const char *path, DIR *dir, const char *rootpath,
- struct got_repository *repo, struct got_fileindex_diff_dir_cb *cb,
- void *cb_arg)
+ const char *path, const char *rootpath, struct got_repository *repo,
+ struct got_fileindex_diff_dir_cb *cb, void *cb_arg)
{
const struct got_error *err = NULL;
struct dirent *de = dle->data;
closedir(subdir);
return err;
}
- err = diff_fileindex_dir(fileindex, ie, subdir, &subdirlist,
- rootpath, subpath, repo, cb, cb_arg);
+ err = diff_fileindex_dir(fileindex, ie, &subdirlist, rootpath,
+ subpath, repo, cb, cb_arg);
free(subpath);
free(subdirpath);
closedir(subdir);
static const struct got_error *
diff_fileindex_dir(struct got_fileindex *fileindex,
- struct got_fileindex_entry **ie, DIR *dir,
- struct got_pathlist_head *dirlist, const char *rootpath, const char *path,
- struct got_repository *repo, struct got_fileindex_diff_dir_cb *cb,
- void *cb_arg)
+ struct got_fileindex_entry **ie, struct got_pathlist_head *dirlist,
+ const char *rootpath, const char *path, struct got_repository *repo,
+ struct got_fileindex_diff_dir_cb *cb, void *cb_arg)
{
const struct got_error *err = NULL;
struct dirent *de = NULL;
break;
*ie = walk_fileindex(fileindex, *ie);
err = walk_dir(&dle, fileindex, ie, dle, path,
- dir, rootpath, repo, cb, cb_arg);
+ rootpath, repo, cb, cb_arg);
} else if (cmp < 0 ) {
err = cb->diff_old(cb_arg, *ie, path);
if (err)
if (err)
break;
err = walk_dir(&dle, fileindex, ie, dle, path,
- dir, rootpath, repo, cb, cb_arg);
+ rootpath, repo, cb, cb_arg);
}
if (err)
break;
err = cb->diff_new(cb_arg, de, path);
if (err)
break;
- err = walk_dir(&dle, fileindex, ie, dle, path, dir,
+ err = walk_dir(&dle, fileindex, ie, dle, path,
rootpath, repo, cb, cb_arg);
if (err)
break;
ie = RB_MIN(got_fileindex_tree, &fileindex->entries);
while (ie && !got_path_is_child(ie->path, path, strlen(path)))
ie = walk_fileindex(fileindex, ie);
- err = diff_fileindex_dir(fileindex, &ie, rootdir, &dirlist, rootpath,
- path, repo, cb, cb_arg);
+ err = diff_fileindex_dir(fileindex, &ie, &dirlist, rootpath, path,
+ repo, cb, cb_arg);
free_dirlist(&dirlist);
return err;
}