Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-01-19 00:49:53 +0300
committerJunio C Hamano <gitster@pobox.com>2019-01-19 00:49:53 +0300
commitec27a940134e940a68228401e54f89d610858a26 (patch)
tree20201a138630a1d06a78cc54d07c4443656d8af1 /builtin
parent4744d03a47d668e0e2ea45a637fd16d782e035b9 (diff)
parent957da7580255f30ce8f1224531e795a9bace3d52 (diff)
Merge branch 'jn/stripspace-wo-repository'
"git stripspace" should be usable outside a git repository, but under the "-s" or "-c" mode, it didn't. * jn/stripspace-wo-repository: stripspace: allow -s/-c outside git repository
Diffstat (limited to 'builtin')
-rw-r--r--builtin/stripspace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/stripspace.c b/builtin/stripspace.c
index bdf0328869..be33eb83c1 100644
--- a/builtin/stripspace.c
+++ b/builtin/stripspace.c
@@ -30,6 +30,7 @@ int cmd_stripspace(int argc, const char **argv, const char *prefix)
{
struct strbuf buf = STRBUF_INIT;
enum stripspace_mode mode = STRIP_DEFAULT;
+ int nongit;
const struct option options[] = {
OPT_CMDMODE('s', "strip-comments", &mode,
@@ -46,7 +47,7 @@ int cmd_stripspace(int argc, const char **argv, const char *prefix)
usage_with_options(stripspace_usage, options);
if (mode == STRIP_COMMENTS || mode == COMMENT_LINES) {
- setup_git_directory_gently(NULL);
+ setup_git_directory_gently(&nongit);
git_config(git_default_config, NULL);
}