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

[PATCH] Warn the users when more than 3 '-C' given.

From
Bo Yang <struggleyb.nku@gmail.com>
Date
Apr 10, 2010, 11:51 UTC
Message-ID
<1270900308-20147-1-git-send-email-struggleyb.nku@gmail.com>

Output a warning message to users when there are more than 3 '-C' options given. And ignore the numeric argument value provided by the additional '-C' options.

Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
---
 builtin/blame.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/builtin/blame.c b/builtin/blame.c
index fc15863..e8ed547 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2165,6 +2165,15 @@ static int blame_copy_callback(const struct option *option, const char *arg, int
 	int *opt = option->value;
 
 	/*
+	 * Warn the users when more than 3 '-C' options are given and
+	 * ignore the corresponding numeric argument of it.
+	 */
+	if (*opt & PICKAXE_BLAME_COPY_HARDEST) {
+		warning("The additional '-C' above 3 is not supported.");
+		return 0;
+	}
+
+	/*
 	 * -C enables copy from removed files;
 	 * -C -C enables copy from existing files, but only
 	 *       when blaming a new file;
-- 
1.7.0.2.273.gc2413.dirty
Next: Junio C Hamano
Message 1 of 3 in “Warn the users when more than 3 '-C' given.”
  1. Warn the users when more than 3 '-C' given.Bo Yang, Apr 10, 2010
  2. Junio C HamanoApr 10, 2010
  3. Yann DirsonApr 12, 2010

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.