+ }
+ }
+ return retval;
+}
+
+static int everything_local(struct ref *refs)
+{
+ int retval;
+
+ for (retval = 1; refs ; refs = refs->next) {
+ const unsigned char *remote = refs->old_sha1;
+ unsigned char local[20];
+
+ if (read_ref(git_path("%s", refs->name), local) < 0 ||
+ memcmp(remote, local, 20)) {
+ retval = 0;
+ if (!verbose)
+ continue;
+ fprintf(stderr,
+ "want %s (%s)\n", sha1_to_hex(remote),
+ refs->name);
+ continue;
+ }
+
+ memcpy(refs->new_sha1, local, 20);
+ if (!verbose)
+ continue;
+ fprintf(stderr,
+ "already have %s (%s)\n", sha1_to_hex(remote),
+ refs->name);