From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: recur status on linux-2.6
Date: Sun, 13 Aug 2006 12:44:57 -0700 [thread overview]
Message-ID: <7vveowl8sm.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0608132006510.10541@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Sun, 13 Aug 2006 20:16:29 +0200 (CEST)")
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> I fail to see how this is worse than -recursive...
These are what I got. ls-files -u output followed by git diff.
[-- Attachment #2: output from recur --]
[-- Type: text/plain, Size: 3377 bytes --]
100644 255988a47f56bfa9364c6aff54e45de252b376b8 1 Makefile
100644 07c421bd266724b966fdc92cbc24ef77d61c0d48 2 Makefile
100644 a538710ed6b53079f85582c83be11ae414380d15 3 Makefile
100644 fad39ff609f3ea27981e7a9ffdfc29731d1065d0 1 upload-pack.c
100644 bbd6bd60b52d806be0a69324009755f49b070082 2 upload-pack.c
100644 e8f4be373cfd0ce03617c5fa1494bf52d4babc6c 3 upload-pack.c
diff --cc Makefile
index 07c421b,a538710..0000000
--- a/Makefile
+++ b/Makefile
@@@ -253,7 -242,7 +253,11 @@@
server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
tag.o tree.o usage.o config.o environment.o ctype.o copy.o \
fetch-clone.o revision.o pager.o tree-walk.o xdiff-interface.o \
++<<<<<<< HEAD/Makefile
+ alloc.o merge-file.o path-list.o unpack-trees.o help.o $(DIFF_OBJS)
++=======
+ alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS)
++>>>>>>> 937a515a15f776aa84430574f71367292a52b978/Makefile
BUILTIN_OBJS = \
builtin-add.o \
diff --cc upload-pack.c
index bbd6bd6,e8f4be3..0000000
--- a/upload-pack.c
+++ b/upload-pack.c
@@@ -327,7 -334,7 +334,11 @@@
if (get_sha1_hex(hex, sha1))
die("git-upload-pack: expected SHA1 object, got '%s'", hex);
if (!has_sha1_file(sha1))
++<<<<<<< HEAD/upload-pack.c
+ return 0;
++=======
+ return -1;
++>>>>>>> 937a515a15f776aa84430574f71367292a52b978/upload-pack.c
o = lookup_object(sha1);
if (!(o && o->parsed))
@@@ -343,8 -354,73 +358,76 @@@
parents;
parents = parents->next)
parents->item->object.flags |= THEY_HAVE;
++<<<<<<< HEAD/upload-pack.c
++=======
+ }
+ if (!we_knew_they_have) {
+ add_object_array(o, NULL, &have_obj);
+ return 1;
+ }
+ return 0;
+ }
+
+ static int reachable(struct commit *want)
+ {
+ struct commit_list *work = NULL;
+
+ insert_by_date(want, &work);
+ while (work) {
+ struct commit_list *list = work->next;
+ struct commit *commit = work->item;
+ free(work);
+ work = list;
+
+ if (commit->object.flags & THEY_HAVE) {
+ want->object.flags |= COMMON_KNOWN;
+ break;
+ }
+ if (!commit->object.parsed)
+ parse_object(commit->object.sha1);
+ if (commit->object.flags & REACHABLE)
+ continue;
+ commit->object.flags |= REACHABLE;
+ if (commit->date < oldest_have)
+ continue;
+ for (list = commit->parents; list; list = list->next) {
+ struct commit *parent = list->item;
+ if (!(parent->object.flags & REACHABLE))
+ insert_by_date(parent, &work);
+ }
+ }
+ want->object.flags |= REACHABLE;
+ clear_commit_marks(want, REACHABLE);
+ free_commit_list(work);
+ return (want->object.flags & COMMON_KNOWN);
+ }
+
+ static int ok_to_give_up(void)
+ {
+ int i;
+
+ if (!have_obj.nr)
+ return 0;
+
+ for (i = 0; i < want_obj.nr; i++) {
+ struct object *want = want_obj.objects[i].item;
+
+ if (want->flags & COMMON_KNOWN)
+ continue;
+ want = deref_tag(want, "a want line", 0);
+ if (!want || want->type != OBJ_COMMIT) {
+ /* no way to tell if this is reachable by
+ * looking at the ancestry chain alone, so
+ * leave a note to ourselves not to worry about
+ * this object anymore.
+ */
+ want_obj.objects[i].item->flags |= COMMON_KNOWN;
+ continue;
+ }
+ if (!reachable((struct commit *)want))
+ return 0;
++>>>>>>> 937a515a15f776aa84430574f71367292a52b978/upload-pack.c
}
- add_object_array(o, NULL, &have_obj);
return 1;
}
[-- Attachment #3: output from recursive --]
[-- Type: text/plain, Size: 1389 bytes --]
100644 99048d0a128186e70f329208a734cc9e72c1a3e7 1 Makefile
100644 07c421bd266724b966fdc92cbc24ef77d61c0d48 2 Makefile
100644 a538710ed6b53079f85582c83be11ae414380d15 3 Makefile
100644 b6cc43c3c89c68e950c6d86298c928e9aab25e70 1 upload-pack.c
100644 bbd6bd60b52d806be0a69324009755f49b070082 2 upload-pack.c
100644 e8f4be373cfd0ce03617c5fa1494bf52d4babc6c 3 upload-pack.c
diff --cc Makefile
index 07c421b,a538710..0000000
--- a/Makefile
+++ b/Makefile
@@@ -253,7 -242,7 +253,11 @@@
server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
tag.o tree.o usage.o config.o environment.o ctype.o copy.o \
fetch-clone.o revision.o pager.o tree-walk.o xdiff-interface.o \
++<<<<<<< HEAD/Makefile
+ alloc.o merge-file.o path-list.o unpack-trees.o help.o $(DIFF_OBJS)
++=======
+ alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS)
++>>>>>>> 937a515a15f776aa84430574f71367292a52b978/Makefile
BUILTIN_OBJS = \
builtin-add.o \
diff --cc upload-pack.c
index bbd6bd6,e8f4be3..0000000
--- a/upload-pack.c
+++ b/upload-pack.c
@@@ -327,7 -334,7 +334,11 @@@
if (get_sha1_hex(hex, sha1))
die("git-upload-pack: expected SHA1 object, got '%s'", hex);
if (!has_sha1_file(sha1))
++<<<<<<< HEAD/upload-pack.c
+ return 0;
++=======
+ return -1;
++>>>>>>> 937a515a15f776aa84430574f71367292a52b978/upload-pack.c
o = lookup_object(sha1);
if (!(o && o->parsed))
next prev parent reply other threads:[~2006-08-13 19:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-13 13:54 recur status on linux-2.6 Johannes Schindelin
2006-08-13 16:58 ` Junio C Hamano
2006-08-13 18:16 ` Johannes Schindelin
2006-08-13 19:44 ` Junio C Hamano [this message]
2006-08-13 20:43 ` Johannes Schindelin
2006-08-18 4:09 ` Junio C Hamano
2006-08-18 10:00 ` Johannes Schindelin
2006-08-19 10:46 ` Fredrik Kuivinen
2006-08-22 8:27 ` Junio C Hamano
2006-08-22 13:57 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vveowl8sm.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).