{"thread":{"id":"31445","subject":"[RFC/PATCH] blame: simplify algorithm","startedAt":"2012-09-05T11:56:46Z","lastAt":"2012-09-05T11:56:46Z","messageCount":1,"participants":["Michael J Gruber"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"198376","messageId":"df3f74c3b86ba27881a29f52543669ea4bee667e.1346845901.git.git@drmicha.warpmail.net","threadId":"31445","inReplyTo":null,"subject":"[RFC/PATCH] blame: simplify algorithm","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-09-05T11:56:46Z","receivedAt":"2012-09-05T11:56:46Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Recent research (http://tirania.org/blog/archive/2012/Aug-29.html)\nresulted in a simplified algorithm for assigning blame in foss projects.\nMake \"git blame\" use that algorithm by default.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nI've updated the man page for 'git annotate' but not the one for 'git\nblame' nor the tests, so this is RFC for now.\n\n Documentation/git-annotate.txt | 2 +-\n builtin/blame.c                | 4 ++++\n 2 files changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-annotate.txt b/Documentation/git-annotate.txt\nindex 05fd482..cbeb996 100644\n--- a/Documentation/git-annotate.txt\n+++ b/Documentation/git-annotate.txt\n@@ -16,7 +16,7 @@ Annotates each line in the given file with information from the commit\n which introduced the line. Optionally annotates from a given revision.\n \n The only difference between this command and linkgit:git-blame[1] is that\n-they use slightly different output formats, and this command exists only\n+they use different output formats, and this command exists only\n for backward compatibility to support existing scripts, and provide a more\n familiar command name for people coming from other SCM systems.\n \ndiff --git a/builtin/blame.c b/builtin/blame.c\nindex 0e102bf..28d5829 100644\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -2341,6 +2341,10 @@ int cmd_blame(int argc, const char **argv, const char *prefix)\n \tstruct parse_opt_ctx_t ctx;\n \tint cmd_is_annotate = !strcmp(argv[0], \"annotate\");\n \n+\tif (!cmd_is_annotate) {\n+\t\tputs(\"Linus\");\n+\t\treturn 0;\n+\t}\n \tgit_config(git_blame_config, NULL);\n \tinit_revisions(&revs, NULL);\n \trevs.date_mode = blame_date_mode;\n-- \n1.7.12.406.gafd3f81\n"}]}