Re: [PATCH] git log [diff-tree options]...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 9 Apr 2006, Johannes Schindelin wrote:

> On Sun, 9 Apr 2006, Linus Torvalds wrote:
> 
> >  - keep it - for historical reasons - as a internal shorthand, and just 
> >    turn it into "git log --diff -cc"
> 
> It is "git log --cc", right?

Like this?

---

 git.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

751e205a9ffd3a55094a0c0f657735023776cf74
diff --git a/git.c b/git.c
index 8776088..3a94afa 100644
--- a/git.c
+++ b/git.c
@@ -385,6 +385,13 @@ static int cmd_log(int argc, const char 
 	return 0;
 }
 
+static int cmd_whatchanged(int argc, const char **argv, char **envp)
+{
+	memmove(argv + 2, argv + 1, argc - 1);
+	argv[1] = "--cc";
+	return cmd_log(argc + 1, argv, envp);
+}
+
 static void handle_internal_command(int argc, const char **argv, char **envp)
 {
 	const char *cmd = argv[0];
@@ -395,6 +402,7 @@ static void handle_internal_command(int 
 		{ "version", cmd_version },
 		{ "help", cmd_help },
 		{ "log", cmd_log },
+		{ "whatchanged", cmd_whatchanged },
 	};
 	int i;
 
-- 
1.2.0.g61002-dirty

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]