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

[PATCH v2 2/3] revert.c: Add --record-origin

From
Guido Günther <agx@sigxcpu.org>
Date
Feb 18, 2014, 21:27 UTC
Message-ID
<a6a124ba7e8a4a4582da28687f5a2aa43c78c31d.1392758057.git.agx@sigxcpu.org>
In-Reply-To
<cover.1392758057.git.agx@sigxcpu.org>
This makes sure we have a command line option that corresponds with the
config file option.
---
 Documentation/git-cherry-pick.txt | 1 +
 builtin/revert.c                  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index c0274bd..63db07d 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -57,6 +57,7 @@ OPTIONS
 	message prior to committing.
 
 -x::
+--record-origin::
 	When recording the commit, append a line that says
 	"(cherry picked from commit ...)" to the original commit
 	message in order to indicate which commit this change was
diff --git a/builtin/revert.c b/builtin/revert.c
index 0c14af4..899f3e4 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -99,7 +99,7 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts)
 
 	if (opts->action == REPLAY_PICK) {
 		struct option cp_extra[] = {
-			OPT_BOOL('x', NULL, &opts->record_origin, N_("append commit name")),
+			OPT_BOOL('x', "record-origin", &opts->record_origin, N_("append commit name")),
 			OPT_BOOL(0, "ff", &opts->allow_ff, N_("allow fast-forward")),
 			OPT_BOOL(0, "allow-empty", &opts->allow_empty, N_("preserve initially empty commits")),
 			OPT_BOOL(0, "allow-empty-message", &opts->allow_empty_message, N_("allow commits with empty messages")),
-- 
1.9.0.rc3
Previous: Junio C HamanoNext: Guido Günther
Message 9 of 10 in “revert.c: Allow to specify -x via git-config”
  1. revert.c: Allow to specify -x via git-configGuido Günther, Feb 18, 2014
  2. John KeepingFeb 18, 2014
  3. Jonathan NiederFeb 18, 2014
  4. brian m. carlsonFeb 18, 2014
  5. Jonathan NiederFeb 18, 2014
  6. 0/3 Allow to configure cherry-pick's record originGuido Günther, Feb 18, 2014
  7. 1/3 revert.c: Allow to specify -x via git-configGuido Günther, Feb 18, 2014
  8. Junio C HamanoFeb 19, 2014
  9. 2/3 revert.c: Add --record-originGuido Günther, Feb 18, 2014
  10. 3/3 revert.c Allow to override cherrypick.recordOriginGuido Günther, Feb 18, 2014

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.