From: "Richard Hartmann" <richih.mailinglist@gmail.com>
To: git@vger.kernel.org
Subject: [Patch] Minor corrections to help & error messages
Date: Mon, 22 Dec 2008 00:53:09 +0100 [thread overview]
Message-ID: <2d460de70812211553q56d20fb0rfbd2f8fdd555103a@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
Hi all,
the two patches should be so obvious, there is not much
need to explain them.
I noticed that quite a few options in the manpages are
not in alphabetical order. Would a patch which fixes
all of those be accepted?
Richard
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Make-help-entries-alphabetical.patch --]
[-- Type: text/x-diff; name=0001-Make-help-entries-alphabetical.patch, Size: 1435 bytes --]
From 59b291d79cdcdb5fe235202cb45705dd4f8f352d Mon Sep 17 00:00:00 2001
From: Richard Hartmann <richih.mailinglist@gmail.com>
Date: Sun, 21 Dec 2008 23:28:25 +0100
Subject: [PATCH] Make help entries alphabetical
Switched the order. If there is a need for more changes, I can do them later.
Signed-off-by: Richard Hartmann <richih@net.in.tum.de>
---
Documentation/config.txt | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 21ea165..52786c7 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -601,10 +601,6 @@ diff.autorefreshindex::
affects only 'git-diff' Porcelain, and not lower level
'diff' commands, such as 'git-diff-files'.
-diff.suppress-blank-empty::
- A boolean to inhibit the standard behavior of printing a space
- before each empty output line. Defaults to false.
-
diff.external::
If this config variable is set, diff generation is not
performed using the internal diff machinery, but using the
@@ -639,6 +635,10 @@ diff.renames::
will enable basic rename detection. If set to "copies" or
"copy", it will detect copies, as well.
+diff.suppress-blank-empty::
+ A boolean to inhibit the standard behavior of printing a space
+ before each empty output line. Defaults to false.
+
fetch.unpackLimit::
If the number of objects fetched over the git native
transfer is below this
--
1.5.6.5
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-Always-show-which-directory-is-not-a-git-repository.patch --]
[-- Type: text/x-diff; name=0002-Always-show-which-directory-is-not-a-git-repository.patch, Size: 2264 bytes --]
From bc332cec43d1a389786c36ee893a0a1d09b112bc Mon Sep 17 00:00:00 2001
From: Richard Hartmann <richih.mailinglist@gmail.com>
Date: Mon, 22 Dec 2008 00:17:32 +0100
Subject: [PATCH] Always show which directory is not a git repository
Unify all
fatal: Not a git repository
error messages so they include path information.
Signed-off-by: Richard Hartmann <richih@net.in.tum.de>
---
contrib/workdir/git-new-workdir | 2 +-
perl/Git.pm | 4 ++--
setup.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir
index 7959eab..993cacf 100755
--- a/contrib/workdir/git-new-workdir
+++ b/contrib/workdir/git-new-workdir
@@ -22,7 +22,7 @@ branch=$3
# want to make sure that what is pointed to has a .git directory ...
git_dir=$(cd "$orig_git" 2>/dev/null &&
git rev-parse --git-dir 2>/dev/null) ||
- die "\"$orig_git\" is not a git repository!"
+ die "Not a git repository: \"$orig_git\""
case "$git_dir" in
.git)
diff --git a/perl/Git.pm b/perl/Git.pm
index dde9105..8392a68 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -204,14 +204,14 @@ sub repository {
unless (-d "$dir/refs" and -d "$dir/objects" and -e "$dir/HEAD") {
# Mimick git-rev-parse --git-dir error message:
- throw Error::Simple('fatal: Not a git repository');
+ throw Error::Simple("fatal: Not a git repository: $dir");
}
my $search = Git->repository(Repository => $dir);
try {
$search->command('symbolic-ref', 'HEAD');
} catch Git::Error::Command with {
# Mimick git-rev-parse --git-dir error message:
- throw Error::Simple('fatal: Not a git repository');
+ throw Error::Simple("fatal: Not a git repository: $dir");
}
$opts{Repository} = abs_path($dir);
diff --git a/setup.c b/setup.c
index 833ced2..6b277b6 100644
--- a/setup.c
+++ b/setup.c
@@ -468,7 +468,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
*nongit_ok = 1;
return NULL;
}
- die("Not a git repository");
+ die("Not a git repository (or any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT);
}
if (chdir(".."))
die("Cannot change to %s/..: %s", cwd, strerror(errno));
--
1.5.6.5
reply other threads:[~2008-12-21 23:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=2d460de70812211553q56d20fb0rfbd2f8fdd555103a@mail.gmail.com \
--to=richih.mailinglist@gmail.com \
--cc=git@vger.kernel.org \
/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).