{"thread":{"id":"43466","subject":"Re: git-pull: \"Cannot obtain needed none\"?","startedAt":"2006-12-12T17:43:48Z","lastAt":"2006-12-13T08:22:07Z","messageCount":2,"participants":["Martin Waitz","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"297783","messageId":"81b0412b0612120943i48c8597u32d0300cbbd7b3e8@mail.gmail.com","threadId":"43466","inReplyTo":null,"subject":"git-pull: \"Cannot obtain needed none\"?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-12-12T17:43:48Z","receivedAt":"2006-12-12T17:43:48Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Sometimes I wonder what language do we use in user-visible messages :)\nWhat none was it, which could not be obtained? Why could none be needed?\nWhy does it happen processing commit 00000...?\n\nerror: Unable to find 9a6e87b60dbd2305c95cecce7d9d60f849a0658d under\nhttp://www.kernel.org/pub/scm/git/git.git/\nCannot obtain needed none 9a6e87b60dbd2305c95cecce7d9d60f849a0658d\nwhile processing commit 0000000000000000000000000000000000000000.\n\nComplete trace:\nGIT_TRACE=1 git pull\ntrace: exec: '/d/scripts/git/git-pull'\ntrace: built-in: git 'rev-parse' '--git-dir'\ntrace: built-in: git 'rev-parse' '--git-dir'\ntrace: built-in: git 'symbolic-ref' 'HEAD'\ntrace: built-in: git 'repo-config' '--get' 'branch.raa/2.remote'\ntrace: built-in: git 'repo-config' '--get' 'remote.origin.url'\ntrace: built-in: git 'repo-config' '--get' 'remote.origin.url'\ntrace: exec: '/d/scripts/git/git-ls-remote'\n'http://www.kernel.org/pub/scm/git/git.git'\ntrace: built-in: git 'repo-config' '--get' 'remote.http:.url'\ntrace: built-in: git 'repo-config' '--bool' 'http.noEPSV'\ntrace: built-in: git 'repo-config' '--get' 'remote.origin.url'\ntrace: built-in: git 'symbolic-ref' 'HEAD'\ntrace: built-in: git 'repo-config' '--get' 'branch.raa/2.remote'\ntrace: built-in: git 'symbolic-ref' 'HEAD'\ntrace: built-in: git 'repo-config' '--get-all' 'branch.raa/2.merge'\ntrace: built-in: git 'check-ref-format' 'heads/git'\ntrace: built-in: git 'check-ref-format' 'heads/pu'\ntrace: built-in: git 'check-ref-format' 'heads/next'\ntrace: built-in: git 'repo-config' '--bool' 'http.noEPSV'\nFetching refs/heads/master from\nhttp://www.kernel.org/pub/scm/git/git.git using http\ntrace: built-in: git 'rev-parse' '--verify'\n'6f9872582246b9b8ee4bdc9f6a563b409aab1ecb^0'\ntrace: built-in: git 'cat-file' '-t' '6f9872582246b9b8ee4bdc9f6a563b409aab1ecb'\ntrace: built-in: git 'rev-parse' '--short'\n'6f9872582246b9b8ee4bdc9f6a563b409aab1ecb'\ntrace: built-in: git 'repo-config' '--bool' 'http.noEPSV'\nFetching refs/heads/pu from http://www.kernel.org/pub/scm/git/git.git using http\nGetting alternates list for http://www.kernel.org/pub/scm/git/git.git/\nGetting pack list for http://www.kernel.org/pub/scm/git/git.git/\nerror: Unable to find 9a6e87b60dbd2305c95cecce7d9d60f849a0658d under\nhttp://www.kernel.org/pub/scm/git/git.git/\nCannot obtain needed none 9a6e87b60dbd2305c95cecce7d9d60f849a0658d\nwhile processing commit 0000000000000000000000000000000000000000.\n\nFWIW, a patch changing it to:\ngit fetch\nFetching refs/heads/master from\nhttp://www.kernel.org/pub/scm/git/git.git using http\nFetching refs/heads/pu from http://www.kernel.org/pub/scm/git/git.git using http\nGetting alternates list for http://www.kernel.org/pub/scm/git/git.git/\nGetting pack list for http://www.kernel.org/pub/scm/git/git.git/\nerror: Unable to find 9a6e87b60dbd2305c95cecce7d9d60f849a0658d under\nhttp://www.kernel.org/pub/scm/git/git.git/\nCannot obtain needed object 9a6e87b60dbd2305c95cecce7d9d60f849a0658d\n\nattached.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n\n\nFrom 38e4d243fd163ca77233f73007b6b623eec81c68 Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Tue, 12 Dec 2006 18:34:02 +0100\nSubject: [PATCH] Clarify fetch error for missing objects.\n\nOtherwise there're such things like:\n\n    Cannot obtain needed none 9a6e87b60dbd2305c95cecce7d9d60f849a0658d\n    while processing commit 0000000000000000000000000000000000000000.\n\nwhich while looks weird. What is the none needed for?\n\ndiff --git a/fetch.c b/fetch.c\nindex c426c04..663b4b2 100644\n--- a/fetch.c\n+++ b/fetch.c\n@@ -22,14 +22,15 @@ void pull_say(const char *fmt, const char *hex)\n \t\tfprintf(stderr, fmt, hex);\n }\n \n-static void report_missing(const char *what, const unsigned char *missing)\n+static void report_missing(const struct object *obj)\n {\n \tchar missing_hex[41];\n-\n-\tstrcpy(missing_hex, sha1_to_hex(missing));;\n-\tfprintf(stderr,\n-\t\t\"Cannot obtain needed %s %s\\nwhile processing commit %s.\\n\",\n-\t\twhat, missing_hex, sha1_to_hex(current_commit_sha1));\n+\tstrcpy(missing_hex, sha1_to_hex(obj->sha1));;\n+\tfprintf(stderr, \"Cannot obtain needed %s %s\\n\",\n+\t\tobj->type ? typename(obj->type): \"object\", missing_hex);\n+\tif (!is_null_sha1(current_commit_sha1))\n+\t\tfprintf(stderr, \"while processing commit %s.\\n\",\n+\t\t\tsha1_to_hex(current_commit_sha1));\n }\n \n static int process(struct object *obj);\n@@ -177,7 +178,7 @@ static int loop(void)\n \t\t */\n \t\tif (! (obj->flags & TO_SCAN)) {\n \t\t\tif (fetch(obj->sha1)) {\n-\t\t\t\treport_missing(typename(obj->type), obj->sha1);\n+\t\t\t\treport_missing(obj);\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t}\n"},{"id":"294933","messageId":"20061213082207.GB7413@admingilde.org","threadId":"43466","inReplyTo":"81b0412b0612120943i48c8597u32d0300cbbd7b3e8@mail.gmail.com","subject":"Re: git-pull: \"Cannot obtain needed none\"?","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-12-13T08:22:07Z","receivedAt":"2006-12-13T08:22:07Z","isPatch":false,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Tue, Dec 12, 2006 at 06:43:48PM +0100, Alex Riesen wrote:\n> error: Unable to find 9a6e87b60dbd2305c95cecce7d9d60f849a0658d under\n> http://www.kernel.org/pub/scm/git/git.git/\n> Cannot obtain needed none 9a6e87b60dbd2305c95cecce7d9d60f849a0658d\n> while processing commit 0000000000000000000000000000000000000000.\n\nYesterday I noticed the exact same message, but with a different sha1, in\nthe logs of my script which updated the linux kernel repository at work.\nI did not have the time to track it down and today everything worked as\nnormal again.\n\n-- \nMartin Waitz\n"}]}