Sometimes I wonder what language do we use in user-visible messages :) What none was it, which could not be obtained? Why could none be needed? Why does it happen processing commit 00000...? error: Unable to find 9a6e87b60dbd2305c95cecce7d9d60f849a0658d under http://www.kernel.org/pub/scm/git/git.git/ Cannot obtain needed none 9a6e87b60dbd2305c95cecce7d9d60f849a0658d while processing commit 0000000000000000000000000000000000000000. Complete trace: GIT_TRACE=1 git pull trace: exec: '/d/scripts/git/git-pull' trace: built-in: git 'rev-parse' '--git-dir' trace: built-in: git 'rev-parse' '--git-dir' trace: built-in: git 'symbolic-ref' 'HEAD' trace: built-in: git 'repo-config' '--get' 'branch.raa/2.remote' trace: built-in: git 'repo-config' '--get' 'remote.origin.url' trace: built-in: git 'repo-config' '--get' 'remote.origin.url' trace: exec: '/d/scripts/git/git-ls-remote' 'http://www.kernel.org/pub/scm/git/git.git' trace: built-in: git 'repo-config' '--get' 'remote.http:.url' trace: built-in: git 'repo-config' '--bool' 'http.noEPSV' trace: built-in: git 'repo-config' '--get' 'remote.origin.url' trace: built-in: git 'symbolic-ref' 'HEAD' trace: built-in: git 'repo-config' '--get' 'branch.raa/2.remote' trace: built-in: git 'symbolic-ref' 'HEAD' trace: built-in: git 'repo-config' '--get-all' 'branch.raa/2.merge' trace: built-in: git 'check-ref-format' 'heads/git' trace: built-in: git 'check-ref-format' 'heads/pu' trace: built-in: git 'check-ref-format' 'heads/next' trace: built-in: git 'repo-config' '--bool' 'http.noEPSV' Fetching refs/heads/master from http://www.kernel.org/pub/scm/git/git.git using http trace: built-in: git 'rev-parse' '--verify' '6f9872582246b9b8ee4bdc9f6a563b409aab1ecb^0' trace: built-in: git 'cat-file' '-t' '6f9872582246b9b8ee4bdc9f6a563b409aab1ecb' trace: built-in: git 'rev-parse' '--short' '6f9872582246b9b8ee4bdc9f6a563b409aab1ecb' trace: built-in: git 'repo-config' '--bool' 'http.noEPSV' Fetching refs/heads/pu from http://www.kernel.org/pub/scm/git/git.git using http Getting alternates list for http://www.kernel.org/pub/scm/git/git.git/ Getting pack list for http://www.kernel.org/pub/scm/git/git.git/ error: Unable to find 9a6e87b60dbd2305c95cecce7d9d60f849a0658d under http://www.kernel.org/pub/scm/git/git.git/ Cannot obtain needed none 9a6e87b60dbd2305c95cecce7d9d60f849a0658d while processing commit 0000000000000000000000000000000000000000. FWIW, a patch changing it to: git fetch Fetching refs/heads/master from http://www.kernel.org/pub/scm/git/git.git using http Fetching refs/heads/pu from http://www.kernel.org/pub/scm/git/git.git using http Getting alternates list for http://www.kernel.org/pub/scm/git/git.git/ Getting pack list for http://www.kernel.org/pub/scm/git/git.git/ error: Unable to find 9a6e87b60dbd2305c95cecce7d9d60f849a0658d under http://www.kernel.org/pub/scm/git/git.git/ Cannot obtain needed object 9a6e87b60dbd2305c95cecce7d9d60f849a0658d attached. Signed-off-by: Alex Riesen <raa.lkml@xxxxxxxxx>
From 38e4d243fd163ca77233f73007b6b623eec81c68 Mon Sep 17 00:00:00 2001 From: Alex Riesen <raa.lkml@xxxxxxxxx> Date: Tue, 12 Dec 2006 18:34:02 +0100 Subject: [PATCH] Clarify fetch error for missing objects. Otherwise there're such things like: Cannot obtain needed none 9a6e87b60dbd2305c95cecce7d9d60f849a0658d while processing commit 0000000000000000000000000000000000000000. which while looks weird. What is the none needed for? diff --git a/fetch.c b/fetch.c index c426c04..663b4b2 100644 --- a/fetch.c +++ b/fetch.c @@ -22,14 +22,15 @@ void pull_say(const char *fmt, const char *hex) fprintf(stderr, fmt, hex); } -static void report_missing(const char *what, const unsigned char *missing) +static void report_missing(const struct object *obj) { char missing_hex[41]; - - strcpy(missing_hex, sha1_to_hex(missing));; - fprintf(stderr, - "Cannot obtain needed %s %s\nwhile processing commit %s.\n", - what, missing_hex, sha1_to_hex(current_commit_sha1)); + strcpy(missing_hex, sha1_to_hex(obj->sha1));; + fprintf(stderr, "Cannot obtain needed %s %s\n", + obj->type ? typename(obj->type): "object", missing_hex); + if (!is_null_sha1(current_commit_sha1)) + fprintf(stderr, "while processing commit %s.\n", + sha1_to_hex(current_commit_sha1)); } static int process(struct object *obj); @@ -177,7 +178,7 @@ static int loop(void) */ if (! (obj->flags & TO_SCAN)) { if (fetch(obj->sha1)) { - report_missing(typename(obj->type), obj->sha1); + report_missing(obj); return -1; } }