Skip to content

Commit

Permalink
Merge branch 'jc/web-blame'
Browse files Browse the repository at this point in the history
* jc/web-blame:
  gitweb: spell "blame --porcelain" with -p
  blame: Document and add help text for -f, -n, and -p
  gitweb: blame porcelain: lineno and orig lineno swapped
  Remove git-annotate.perl and create a builtin-alias for git-blame
  gitweb: use blame --porcelain
  git-blame --porcelain
  blame.c: move code to output metainfo into a separate function.
  git-blame: --show-number (and -n)
  git-blame: --show-name (and -f)
  blame.c: whitespace and formatting clean-up.
  Gitweb - provide site headers and footers
  gitweb: blame: Mouse-over commit-8 shows author and date
  gitweb: blame: print commit-8 on the leading row of a commit-block
  Revert 954a618
  gitweb: prepare for repositories with packed refs.
  gitweb: make leftmost column of blame less cluttered.
  • Loading branch information
Junio C Hamano committed Oct 25, 2006
2 parents 7756b1f + 48fd688 commit 8e95026
Show file tree
Hide file tree
Showing 8 changed files with 483 additions and 883 deletions.
39 changes: 38 additions & 1 deletion Documentation/git-blame.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ git-blame - Show what revision and author last modified each line of a file

SYNOPSIS
--------
'git-blame' [-c] [-l] [-t] [-S <revs-file>] [--] <file> [<rev>]
'git-blame' [-c] [-l] [-t] [-f] [-n] [-p] [-S <revs-file>] [--] <file> [<rev>]

DESCRIPTION
-----------
Expand Down Expand Up @@ -45,10 +45,47 @@ OPTIONS
-S, --rev-file <revs-file>::
Use revs from revs-file instead of calling gitlink:git-rev-list[1].

-f, --show-name::
Show filename in the original commit. By default
filename is shown if there is any line that came from a
file with different name, due to rename detection.

-n, --show-number::
Show line number in the original commit (Default: off).

-p, --porcelain::
Show in a format designed for machine consumption.

-h, --help::
Show help message.


THE PORCELAIN FORMAT
--------------------

In this format, each line is output after a header; the
header at the minumum has the first line which has:

- 40-byte SHA-1 of the commit the line is attributed to;
- the line number of the line in the original file;
- the line number of the line in the final file;
- on a line that starts a group of line from a different
commit than the previous one, the number of lines in this
group. On subsequent lines this field is absent.

This header line is followed by the following information
at least once for each commit:

- author name ("author"), email ("author-mail"), time
("author-time"), and timezone ("author-tz"); similarly
for committer.
- filename in the commit the line is attributed to.
- the first line of the commit log message ("summary").

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.

SEE ALSO
--------
gitlink:git-annotate[1]
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ GITWEB_HOMETEXT = indextext.html
GITWEB_CSS = gitweb.css
GITWEB_LOGO = git-logo.png
GITWEB_FAVICON = git-favicon.png
GITWEB_SITE_HEADER =
GITWEB_SITE_FOOTER =

export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR

Expand Down Expand Up @@ -173,7 +175,7 @@ SCRIPT_SH = \
SCRIPT_PERL = \
git-archimport.perl git-cvsimport.perl git-relink.perl \
git-shortlog.perl git-rerere.perl \
git-annotate.perl git-cvsserver.perl \
git-cvsserver.perl \
git-svnimport.perl git-cvsexportcommit.perl \
git-send-email.perl git-svn.perl

Expand Down Expand Up @@ -265,6 +267,7 @@ LIB_OBJS = \

BUILTIN_OBJS = \
builtin-add.o \
builtin-annotate.o \
builtin-apply.o \
builtin-archive.o \
builtin-cat-file.o \
Expand Down Expand Up @@ -675,6 +678,8 @@ gitweb/gitweb.cgi: gitweb/gitweb.perl
-e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \
-e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
-e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
-e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \
-e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
$< >$@+
chmod +x $@+
mv $@+ $@
Expand Down
Loading

0 comments on commit 8e95026

Please sign in to comment.