From: Michael J Gruber <git@drmicha.warpmail.net>
To: git@vger.kernel.org
Subject: [RFC/PATCH] blame: simplify algorithm
Date: Wed, 5 Sep 2012 13:56:46 +0200 [thread overview]
Message-ID: <df3f74c3b86ba27881a29f52543669ea4bee667e.1346845901.git.git@drmicha.warpmail.net> (raw)
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
reply other threads:[~2012-09-05 11:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=df3f74c3b86ba27881a29f52543669ea4bee667e.1346845901.git.git@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).