summaryrefslogtreecommitdiff
path: root/Documentation/git-blame.txt
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-05-09 13:34:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-09 22:27:50 (GMT)
commited747dd5216ba1fe6fa59da9585dcd6cced202bb (patch)
treeb3d07c9cecee5fb7f13c3249ba629fbabdf3e7c3 /Documentation/git-blame.txt
parente86226e34097ce22ed78a9e759564110f141dda0 (diff)
downloadgit-ed747dd5216ba1fe6fa59da9585dcd6cced202bb.zip
git-ed747dd5216ba1fe6fa59da9585dcd6cced202bb.tar.gz
git-ed747dd5216ba1fe6fa59da9585dcd6cced202bb.tar.bz2
blame: add --line-porcelain output format
This is just like --porcelain, except that we always output the commit information for each line, not just the first time it is referenced. This can make quick and dirty scripts much easier to write; see the example added to the blame documentation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-blame.txt')
-rw-r--r--Documentation/git-blame.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
index bb8edb4..9516914 100644
--- a/Documentation/git-blame.txt
+++ b/Documentation/git-blame.txt
@@ -105,6 +105,19 @@ The contents of the actual line is output after the above
header, prefixed by a TAB. This is to allow adding more
header elements later.
+The porcelain format generally suppresses commit information that has
+already been seen. For example, two lines that are blamed to the same
+commit will both be shown, but the details for that commit will be shown
+only once. This is more efficient, but may require more state be kept by
+the reader. The `--line-porcelain` option can be used to output full
+commit information for each line, allowing simpler (but less efficient)
+usage like:
+
+ # count the number of lines attributed to each author
+ git blame --line-porcelain file |
+ sed -n 's/^author //p' |
+ sort | uniq -c | sort -rn
+
SPECIFYING RANGES
-----------------