Re: [PATCH] Keep committer and committer dates

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Schindelin
Date: Thursday, June 5, 2008 - 6:54 am

Hi,

On Thu, 5 Jun 2008, Jaroslav Kysela wrote:


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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Keep committer and committer dates, Jaroslav Kysela, (Tue Jun 3, 7:59 am)
Re: [PATCH] Keep committer and committer dates, Johannes Schindelin, (Tue Jun 3, 1:16 pm)
Re: [PATCH] Keep committer and committer dates, Jaroslav Kysela, (Wed Jun 4, 2:16 am)
Re: [PATCH] Keep committer and committer dates, Jakub Narebski, (Wed Jun 4, 4:12 am)
Re: [PATCH] Keep committer and committer dates, Jaroslav Kysela, (Wed Jun 4, 5:29 am)
Re: [PATCH] Keep committer and committer dates, Nicolas Pitre, (Wed Jun 4, 7:22 am)
Re: [PATCH] Keep committer and committer dates, Johannes Schindelin, (Wed Jun 4, 8:43 am)
Re: [PATCH] Keep committer and committer dates, Stephan Beyer, (Wed Jun 4, 6:03 pm)
Re: [PATCH] Keep committer and committer dates, Johannes Schindelin, (Wed Jun 4, 9:25 pm)
Re: [PATCH] Keep committer and committer dates, Junio C Hamano, (Wed Jun 4, 10:03 pm)
Re: [PATCH] Keep committer and committer dates, Johannes Sixt, (Thu Jun 5, 12:10 am)
Re: [PATCH] Keep committer and committer dates, Jaroslav Kysela, (Thu Jun 5, 5:44 am)
Re: [PATCH] Keep committer and committer dates, Johannes Schindelin, (Thu Jun 5, 6:13 am)
Re: [PATCH] Keep committer and committer dates, Jaroslav Kysela, (Thu Jun 5, 6:38 am)
Re: [PATCH] Keep committer and committer dates, Johannes Schindelin, (Thu Jun 5, 6:54 am)
Re: [PATCH] Keep committer and committer dates, Jaroslav Kysela, (Thu Jun 5, 7:11 am)
Re: [PATCH] Keep committer and committer dates, Johannes Schindelin, (Thu Jun 5, 7:46 am)
Re: [PATCH] Keep committer and committer dates, Jaroslav Kysela, (Thu Jun 5, 8:16 am)
Re: [PATCH] Keep committer and committer dates, Boaz Harrosh, (Thu Jun 5, 9:34 am)