git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: warning: no common commits - slow pull

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Mar 9, 2008, 18:47 UTC
Message-ID
<alpine.LNX.1.00.0803091443440.19665@iabervon.org>
In-Reply-To
<alpine.LNX.1.00.0803081826080.19665@iabervon.org>
On Sat, 8 Mar 2008, Daniel Barkalow wrote:
Show 12 quoted lines
> On Sat, 8 Mar 2008, David Brownell wrote:
> 
> > On Saturday 08 March 2008, Daniel Barkalow wrote:
> > > I think that there's a dependance on how your current state and  
> > > the new state happen to line up.
> > 
> > The workspace in the tarball I can send you doesn't have any issues
> > with reproducibility ... now.  
> 
> Let me see if I can write up a patch that you should be able to test 
> without moving the big file around. I may run out of time for tonight, 
> though.

Try this. I'm not at all sure that it's doing what I want, but it passes all the current tests, and it should only affect your test case if it's actually right.

diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 29b38e4..37cae35 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -26,6 +26,8 @@ static const char fetch_pack_usage[] =
 #define SEEN		(1U << 3)
 #define POPPED		(1U << 4)
 
+static int marked;
+
 /*
  * After sending this many "have"s if we do not get any new ACK , we
  * give up traversing our history.
@@ -61,6 +63,16 @@ static int rev_list_insert_ref(const char *path, const unsigned char *sha1, int
 	return 0;
 }
 
+static int clear_marks(const char *path, const unsigned char *sha1, int flag, void *cb_data)
+{
+	struct object *o = deref_tag(parse_object(sha1), path, 0);
+
+	if (o && o->type == OBJ_COMMIT)
+		clear_commit_marks((struct commit *)o, 
+				   COMMON | COMMON_REF | SEEN | POPPED);
+	return 0;
+}
+
 /*
    This function marks a rev and its ancestors as common.
    In some cases, it is desirable to mark only the ancestors (for example
@@ -153,6 +165,10 @@ static int find_common(int fd[2], unsigned char *result_sha1,
 	unsigned in_vain = 0;
 	int got_continue = 0;
 
+	if (marked)
+		for_each_ref(clear_marks, NULL);
+	marked = 1;
+
 	for_each_ref(rev_list_insert_ref, NULL);
 
 	fetching = 0;
Previous: Daniel BarkalowNext: David Brownell
Message 7 of 9 in “Re: warning: no common commits - slow pull”
  1. David BrownellMar 7, 2008
  2. Daniel BarkalowMar 8, 2008
  3. David BrownellMar 8, 2008
  4. Daniel BarkalowMar 8, 2008
  5. David BrownellMar 8, 2008
  6. Daniel BarkalowMar 8, 2008
  7. Daniel BarkalowMar 9, 2008
  8. David BrownellMar 10, 2008
  9. Daniel BarkalowMar 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.