git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Keep committer and committer dates

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 5, 2008, 13:54 UTC
Message-ID
<alpine.DEB.1.00.0806051452380.21190@racer>
In-Reply-To
<Pine.LNX.4.61.0806051528220.1798@tm8103-a.perex-int.cz>
Hi,
On Thu, 5 Jun 2008, Jaroslav Kysela wrote:
Show 7 quoted lines
> On Thu, 5 Jun 2008, Johannes Schindelin wrote:
> 
> > It would make a wonderfully helpful tool less helpful.
> 
> I don't agree. Tool is tool. Every tool can be used in a wrong way. A 
> notice to documentation that some of functionality should be used very 
> carefully should be enough.
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 there is that you -- again -- lie about the committers.  
> > They _never_ saw, approved, or tested those commits.
> 
> If I changed portion of unpublished tree, as maintainer I can combine 
> any patches and it might make sense to keep at least my commit dates for 
> my reference.

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
Previous: Jaroslav KyselaNext: Jaroslav Kysela
Message 16 of 20 in “Keep committer and committer dates”
  1. Keep committer and committer datesJaroslav Kysela, Jun 3, 2008
  2. Johannes SchindelinJun 3, 2008
  3. Jaroslav KyselaJun 4, 2008
  4. Karl HasselströmJun 4, 2008
  5. Jakub NarebskiJun 4, 2008
  6. Jaroslav KyselaJun 4, 2008
  7. Nicolas PitreJun 4, 2008
  8. Johannes SchindelinJun 4, 2008
  9. Stephan BeyerJun 5, 2008
  10. Johannes SchindelinJun 5, 2008
  11. Junio C HamanoJun 5, 2008
  12. Johannes SixtJun 5, 2008
  13. Jaroslav KyselaJun 5, 2008
  14. Johannes SchindelinJun 5, 2008
  15. Jaroslav KyselaJun 5, 2008
  16. Johannes SchindelinJun 5, 2008
  17. Jaroslav KyselaJun 5, 2008
  18. Johannes SchindelinJun 5, 2008
  19. Jaroslav KyselaJun 5, 2008
  20. Boaz HarroshJun 5, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.