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

RE: linux-2.6.git mirror

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Oct 18, 2007, 23:24 UTC
Message-ID
<alpine.LFD.0.999.0710181617090.26902@woody.linux-foundation.org>
In-Reply-To
<598D5675D34BE349929AF5EDE9B03E270168517F@az33exm24.fsl.freescale.net>
On Thu, 18 Oct 2007, Medve Emilian-EMMEDVE1 wrote:
Show 7 quoted lines
> 
> > > Is this something I should be worried about?
> > 
> > No, but if it still happens with a newer git, holler.
> 
> I tested this with Junio's latest master and a couple of stable releases
> from the maint branch with the same result.
Ok, what is going on is:
 - append_fetch_head() looks up the SHA1 for all heads (including tags):
        if (get_sha1(head, sha1))
                return error("Not a valid object name: %s", head);
 - it then wants to check if it's a candidate for merging (because 
   fetching also does the whole "list which heads to merge" in case it is 
   going to be part of a "pull"):
        commit = lookup_commit_reference(sha1);
        if (!commit)
                not_for_merge = 1;
 - and that "lookup_commit_reference()" is just very vocal about the case 
   where it fails. It really shouldn't be, and it shouldn't affect the 
   actual end result, but that basically explains why you get that scary 
   warning.

In short, the warning is just bogus, and should be harmless, but I agree that it's ugly. I think the appended patch should fix it.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---

And yes, I think this should go into Shawns tree of fixes, assuming that Emil confirms that it fixes it for him.

			Linus
 builtin-fetch--tool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c
index 1e43d79..e26817d 100644
--- a/builtin-fetch--tool.c
+++ b/builtin-fetch--tool.c
@@ -131,7 +131,7 @@ static int append_fetch_head(FILE *fp,
 
 	if (get_sha1(head, sha1))
 		return error("Not a valid object name: %s", head);
-	commit = lookup_commit_reference(sha1);
+	commit = lookup_commit_reference_gently(sha1, 1);
 	if (!commit)
 		not_for_merge = 1;
 
Previous: Medve Emilian-EMMEDVE1Next: Medve Emilian-EMMEDVE1
Message 5 of 6 in “linux-2.6.git mirror”
  1. Medve Emilian-EMMEDVE1Oct 16, 2007
  2. Medve Emilian-EMMEDVE1Oct 16, 2007
  3. Linus TorvaldsOct 18, 2007
  4. Medve Emilian-EMMEDVE1Oct 18, 2007
  5. Linus TorvaldsOct 18, 2007
  6. Medve Emilian-EMMEDVE1Oct 19, 2007

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.