git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* repo-config needs a prefix.
@ 2006-08-10  9:36 Robert Shearman
  2006-08-10  9:42 ` Johannes Schindelin
  2006-08-10  9:51 ` Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: Robert Shearman @ 2006-08-10  9:36 UTC (permalink / raw)
  To: Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]


This fixes the message received when invoking certain commands from 
outside of a git tree, so e.g. instead of receiving this:
/home/rob/bin/git-fetch: line 89: /FETCH_HEAD: Permission denied
We get this again:
fatal: Not a git repository: '.git'
---
  git.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

[-- Attachment #2: c0aa527060f6ba202986564731e7277f11f31639.diff --]
[-- Type: text/x-patch, Size: 382 bytes --]

diff --git a/git.c b/git.c
index 18ba14a..f9c76a1 100644
--- a/git.c
+++ b/git.c
@@ -264,7 +264,7 @@ static void handle_internal_command(int 
 		{ "prune", cmd_prune, NEEDS_PREFIX },
 		{ "mv", cmd_mv, NEEDS_PREFIX },
 		{ "prune-packed", cmd_prune_packed, NEEDS_PREFIX },
-		{ "repo-config", cmd_repo_config },
+		{ "repo-config", cmd_repo_config, NEEDS_PREFIX },
 	};
 	int i;
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: repo-config needs a prefix.
  2006-08-10  9:36 repo-config needs a prefix Robert Shearman
@ 2006-08-10  9:42 ` Johannes Schindelin
  2006-08-10  9:51 ` Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Schindelin @ 2006-08-10  9:42 UTC (permalink / raw)
  To: Robert Shearman; +Cc: Git Mailing List

Hi,

On Thu, 10 Aug 2006, Robert Shearman wrote:

> -               { "repo-config", cmd_repo_config },
> +               { "repo-config", cmd_repo_config, NEEDS_PREFIX },

Doesn't this prevent

$ git-ls-remote kernel

from being run anywhere, when the relevant information is in 
$HOME/.gitconfig?

I'd rather fix git-fetch to cd to the root of the repo, since it really 
does not make sense to expect git-fetch to fetch just one subdirectory.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: repo-config needs a prefix.
  2006-08-10  9:36 repo-config needs a prefix Robert Shearman
  2006-08-10  9:42 ` Johannes Schindelin
@ 2006-08-10  9:51 ` Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2006-08-10  9:51 UTC (permalink / raw)
  To: Robert Shearman; +Cc: git

While I do agree that it would be better to give nicer message
when running "git-fetch" in bogus places, I do not know if your
patch is the right fix.  Especially, I am not sure if this
change meshes well with this fix a few months ago.

commit 4d599e6bb46d6ef3276425af34922fdbf3aac473
Author: Linus Torvalds <torvalds@osdl.org>
Date:   Thu May 25 08:22:42 2006 -0700

    bogus "fatal: Not a git repository"
    
    I was just testing that "git ls-remote" change by Junio, and when you're
    not in a git repository, it gives this totally bogus warning. The _target_
    obviously has to be a git repository, but there's no reason why you'd have
    to be in a local git repo when doing an ls-remote.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-10  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-10  9:36 repo-config needs a prefix Robert Shearman
2006-08-10  9:42 ` Johannes Schindelin
2006-08-10  9:51 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).