Thread (10 messages) flat view 10 messages, 3 authors, 2017-01-09

Re: [PATCH 4/5] unpack-trees: factor file removal out of check_updates

From: Jeff King <hidden>
Date: 2017-01-07 01:36:09

On Fri, Jan 06, 2017 at 01:03:29PM -0800, Stefan Beller wrote:
+static int remove_workingtree_files(struct unpack_trees_options *o,
+				    struct progress *progress)
+{
+	int i;
+	unsigned cnt = 0;
+	struct index_state *index = &o->result;
+
+	for (i = 0; i < index->cache_nr; i++) {
+		const struct cache_entry *ce = index->cache[i];
+
+		if (ce->ce_flags & CE_WT_REMOVE) {
+			display_progress(progress, ++cnt);
+			if (o->update && !o->dry_run)
+				unlink_entry(ce);
+		}
+	}
+
+	return cnt;
+}
"cnt" is unsigned here, as it is in the caller. Should the return value
match?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help