From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
Jonathan Niedier <jrnieder@gmail.com>,
git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH] Take it easy on unallowed access to non-existent repository
Date: Sun, 11 Apr 2010 13:01:22 +0200 [thread overview]
Message-ID: <1270983682-12215-1-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <20100409001322.GB23501@coredump.intra.peff.net>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
2010/4/9 Jeff King <peff@peff.net>:
> Yeah, that sounds reasonable, especially if merging this to 'next' would
> make git unusable. We want to shake out bugs, not punish people running
> next. :) But I haven't even really looked at the topic in detail yet.
This patch could be squashed into 551a5786 (Guard unallowed access to repository..)
Still don't know what to do with "git ls-remote". I'm not familiar with it.
config.c | 2 +-
environment.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/config.c b/config.c
index 9981b09..63702bf 100644
--- a/config.c
+++ b/config.c
@@ -738,7 +738,7 @@ int git_config(config_fn_t fn, void *data)
int ret;
if (startup_info && !startup_info->have_run_setup_gitdir)
- die("internal error: access to .git/config without repo setup");
+ warning("Broken repository setup: early access to $GIT_DIR/config");
if (!startup_info || startup_info->have_repository)
repo_config = git_pathdup("config");
ret = git_config_early(fn, data, repo_config);
diff --git a/environment.c b/environment.c
index 28624ad..dbaed04 100644
--- a/environment.c
+++ b/environment.c
@@ -99,7 +99,7 @@ void unset_git_env(void)
static void setup_git_env(void)
{
if (startup_info && startup_info->have_run_setup_gitdir)
- die("internal error: setup_git_env can't be called twice");
+ warning("Broken repository setup: setup_git_env() called twice");
git_dir = getenv(GIT_DIR_ENVIRONMENT);
if (!git_dir) {
/*
@@ -107,7 +107,7 @@ static void setup_git_env(void)
* or enter_repo, not by this function
*/
if (startup_info)
- die("internal error: $GIT_DIR is empty");
+ warning("Broken respository setup: git_dir is empty");
git_dir = read_gitfile_gently(DEFAULT_GIT_DIR_ENVIRONMENT);
}
if (!git_dir)
--
1.7.0.rc1.541.g2da82.dirty
next prev parent reply other threads:[~2010-04-11 11:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 0:48 What's cooking in git.git (Apr 2010, #03; Wed, 07) Junio C Hamano
2010-04-08 6:05 ` Johannes Sixt
2010-04-08 6:33 ` Junio C Hamano
2010-04-08 9:01 ` Fredrik Kuivinen
2010-04-08 9:14 ` ***SPAM*** " Tor Arntsen
2010-04-08 9:16 ` Tor Arntsen
2010-04-08 7:38 ` Jeff King
2010-04-08 21:42 ` nd/setup Jonathan Nieder
2010-04-09 0:13 ` nd/setup Jeff King
2010-04-11 11:01 ` Nguyễn Thái Ngọc Duy [this message]
2010-04-11 15:45 ` [PATCH] Take it easy on unallowed access to non-existent repository Sverre Rabbelier
2010-04-11 17:49 ` Nguyen Thai Ngoc Duy
2010-04-11 17:52 ` Sverre Rabbelier
2010-04-11 17:57 ` Nguyen Thai Ngoc Duy
2010-04-09 5:46 ` nd/setup Nguyen Thai Ngoc Duy
2010-04-09 5:57 ` nd/setup Jonathan Nieder
2010-04-09 6:56 ` nd/setup Nguyen Thai Ngoc Duy
2010-04-11 17:57 ` nd/setup Nguyen Thai Ngoc Duy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1270983682-12215-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).