commit - 63de41366136877da3e3da97069a20bd177f0d3a
commit + 70e2377c0226613312687962277bc22835bbf250
blob - 54dd0e8231693c608ac065679a291cd4cf9e0719
blob + 0116d689259b746f3b210c9d0268f0d4a67ad2cf
--- lib/fileindex.c
+++ lib/fileindex.c
return got_error(GOT_ERR_FILEIDX_CSUM);
return NULL;
-}
-
-/*
- * Decide whether ie or te are equivalent, and if they aren't,
- * then decide which should be processed first.
- */
-static int
-cmp_entries(struct got_fileindex_entry *ie, const char *parent_path,
- size_t parent_len, struct got_tree_entry *te)
-{
- int cmp = strncmp(ie->path, parent_path, parent_len);
- if (cmp == 0 || parent_len == 0) {
- char *ie_name = ie->path + parent_len;
- while (ie_name[0] == '/')
- ie_name++;
- cmp = strcmp(ie_name, te->name);
- }
- return cmp;
-
}
static const struct got_error *
return NULL;
}
+/*
+ * Decide whether ie or te are equivalent, and if they aren't,
+ * then decide which should be processed first.
+ */
+static int
+cmp_entries(struct got_fileindex_entry *ie, const char *parent_path,
+ size_t parent_len, struct got_tree_entry *te)
+{
+ int cmp = strncmp(ie->path, parent_path, parent_len);
+ if (cmp == 0 || parent_len == 0) {
+ char *ie_name = ie->path + parent_len;
+ while (ie_name[0] == '/')
+ ie_name++;
+ cmp = strcmp(ie_name, te->name);
+ }
+ return cmp;
+
+}
+
static const struct got_error *
diff_fileindex_tree(struct got_fileindex *fileindex,
struct got_fileindex_entry **ie, struct got_tree_object *tree,