git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH] blame: simplify algorithm
@ 2012-09-05 11:56 Michael J Gruber
  0 siblings, 0 replies; only message in thread
From: Michael J Gruber @ 2012-09-05 11:56 UTC (permalink / raw)
  To: git

Recent research (http://tirania.org/blog/archive/2012/Aug-29.html)
resulted in a simplified algorithm for assigning blame in foss projects.
Make "git blame" use that algorithm by default.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
I've updated the man page for 'git annotate' but not the one for 'git
blame' nor the tests, so this is RFC for now.

 Documentation/git-annotate.txt | 2 +-
 builtin/blame.c                | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-annotate.txt b/Documentation/git-annotate.txt
index 05fd482..cbeb996 100644
--- a/Documentation/git-annotate.txt
+++ b/Documentation/git-annotate.txt
@@ -16,7 +16,7 @@ Annotates each line in the given file with information from the commit
 which introduced the line. Optionally annotates from a given revision.
 
 The only difference between this command and linkgit:git-blame[1] is that
-they use slightly different output formats, and this command exists only
+they use different output formats, and this command exists only
 for backward compatibility to support existing scripts, and provide a more
 familiar command name for people coming from other SCM systems.
 
diff --git a/builtin/blame.c b/builtin/blame.c
index 0e102bf..28d5829 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2341,6 +2341,10 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 	struct parse_opt_ctx_t ctx;
 	int cmd_is_annotate = !strcmp(argv[0], "annotate");
 
+	if (!cmd_is_annotate) {
+		puts("Linus");
+		return 0;
+	}
 	git_config(git_blame_config, NULL);
 	init_revisions(&revs, NULL);
 	revs.date_mode = blame_date_mode;
-- 
1.7.12.406.gafd3f81

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-05 11:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 11:56 [RFC/PATCH] blame: simplify algorithm Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).