aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-10-28 11:21:46 -0700
committerJunio C Hamano <gitster@pobox.com>2009-10-28 11:21:46 -0700
commitcd0f8e6d63d3e2744d7d3b2329238be7d064a8ea (patch)
tree1dec0df37dae5154604064c4c8a8b50e90058a16
parentc1e01b0c5106451770ae77a62f52acfe814c3326 (diff)
parent7c3baa9abf0abe15f068d95688bbc27e73a69042 (diff)
downloadgit-cd0f8e6d63d3e2744d7d3b2329238be7d064a8ea.tar.gz
git-cd0f8e6d63d3e2744d7d3b2329238be7d064a8ea.tar.xz
Merge branch 'maint'
* maint: help -a: do not unnecessarily look for a repository Do not try to remove directories when removing old links rebase -i: more graceful handling of invalid commands help -i: properly error out if no info viewer can be found
-rw-r--r--Makefile2
-rw-r--r--builtin-help.c7
-rwxr-xr-xgit-rebase--interactive.sh7
3 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 42b7d60e1..268aede56 100644
--- a/Makefile
+++ b/Makefile
@@ -1375,7 +1375,7 @@ SHELL = $(SHELL_PATH)
all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
ifneq (,$X)
- $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$p' -ef '$p$X' || $(RM) '$p';)
+ $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';)
endif
all::
diff --git a/builtin-help.c b/builtin-help.c
index e1eba778a..ca08519d9 100644
--- a/builtin-help.c
+++ b/builtin-help.c
@@ -372,6 +372,7 @@ static void show_info_page(const char *git_cmd)
const char *page = cmd_to_page(git_cmd);
setenv("INFOPATH", system_path(GIT_INFO_PATH), 1);
execlp("info", "info", "gitman", page, NULL);
+ die("no info viewer handled the request");
}
static void get_html_page_path(struct strbuf *page_path, const char *page)
@@ -416,9 +417,6 @@ int cmd_help(int argc, const char **argv, const char *prefix)
const char *alias;
load_command_list("git-", &main_cmds, &other_cmds);
- setup_git_directory_gently(&nongit);
- git_config(git_help_config, NULL);
-
argc = parse_options(argc, argv, prefix, builtin_help_options,
builtin_help_usage, 0);
@@ -429,6 +427,9 @@ int cmd_help(int argc, const char **argv, const char *prefix)
return 0;
}
+ setup_git_directory_gently(&nongit);
+ git_config(git_help_config, NULL);
+
if (!argv[0]) {
printf("usage: %s\n\n", git_usage_string);
list_common_cmds_help();
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index a1879e3ac..53ad248ee 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -416,7 +416,12 @@ do_next () {
;;
*)
warn "Unknown command: $command $sha1 $rest"
- die_with_patch $sha1 "Please fix this in the file $TODO."
+ if git rev-parse --verify -q "$sha1" >/dev/null
+ then
+ die_with_patch $sha1 "Please fix this in the file $TODO."
+ else
+ die "Please fix this in the file $TODO."
+ fi
;;
esac
test -s "$TODO" && return