{"thread":{"id":"5194","subject":"repo-config needs a prefix.","startedAt":"2006-08-10T09:36:52Z","lastAt":"2006-08-10T09:51:08Z","messageCount":3,"participants":["Robert Shearman","Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"25079","messageId":"44DAFE34.50701@codeweavers.com","threadId":"5194","inReplyTo":null,"subject":"repo-config needs a prefix.","fromName":"Robert Shearman","fromEmail":"rob@codeweavers.com","sentAt":"2006-08-10T09:36:52Z","receivedAt":"2006-08-10T09:36:52Z","isPatch":false,"sender":{"key":"robertshearman@gmail.com","avatar":null},"body":"\nThis fixes the message received when invoking certain commands from \noutside of a git tree, so e.g. instead of receiving this:\n/home/rob/bin/git-fetch: line 89: /FETCH_HEAD: Permission denied\nWe get this again:\nfatal: Not a git repository: '.git'\n---\n  git.c |    2 +-\n  1 files changed, 1 insertions(+), 1 deletions(-)\n\n\ndiff --git a/git.c b/git.c\nindex 18ba14a..f9c76a1 100644\n--- a/git.c\n+++ b/git.c\n@@ -264,7 +264,7 @@ static void handle_internal_command(int \n \t\t{ \"prune\", cmd_prune, NEEDS_PREFIX },\n \t\t{ \"mv\", cmd_mv, NEEDS_PREFIX },\n \t\t{ \"prune-packed\", cmd_prune_packed, NEEDS_PREFIX },\n-\t\t{ \"repo-config\", cmd_repo_config },\n+\t\t{ \"repo-config\", cmd_repo_config, NEEDS_PREFIX },\n \t};\n \tint i;\n \n\n"},{"id":"25081","messageId":"Pine.LNX.4.63.0608101140040.13885@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5194","inReplyTo":"44DAFE34.50701@codeweavers.com","subject":"Re: repo-config needs a prefix.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-08-10T09:42:47Z","receivedAt":"2006-08-10T09:42:47Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 10 Aug 2006, Robert Shearman wrote:\n\n> -               { \"repo-config\", cmd_repo_config },\n> +               { \"repo-config\", cmd_repo_config, NEEDS_PREFIX },\n\nDoesn't this prevent\n\n$ git-ls-remote kernel\n\nfrom being run anywhere, when the relevant information is in \n$HOME/.gitconfig?\n\nI'd rather fix git-fetch to cd to the root of the repo, since it really \ndoes not make sense to expect git-fetch to fetch just one subdirectory.\n\nCiao,\nDscho\n"},{"id":"25083","messageId":"7v8xlwx6k3.fsf@assigned-by-dhcp.cox.net","threadId":"5194","inReplyTo":"44DAFE34.50701@codeweavers.com","subject":"Re: repo-config needs a prefix.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-10T09:51:08Z","receivedAt":"2006-08-10T09:51:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"While I do agree that it would be better to give nicer message\nwhen running \"git-fetch\" in bogus places, I do not know if your\npatch is the right fix.  Especially, I am not sure if this\nchange meshes well with this fix a few months ago.\n\ncommit 4d599e6bb46d6ef3276425af34922fdbf3aac473\nAuthor: Linus Torvalds <torvalds@osdl.org>\nDate:   Thu May 25 08:22:42 2006 -0700\n\n    bogus \"fatal: Not a git repository\"\n    \n    I was just testing that \"git ls-remote\" change by Junio, and when you're\n    not in a git repository, it gives this totally bogus warning. The _target_\n    obviously has to be a git repository, but there's no reason why you'd have\n    to be in a local git repo when doing an ls-remote.\n"}]}