* jc/blame:
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: Make the Git logo link target to point to the homepage
gitweb: blame: Minimize vertical table row padding
gitweb: Do not print "log" and "shortlog" redundantly in commit view
vc-git.el: Switch to using git-blame instead of git-annotate.
git.el: Fixed inverted "renamed from/to" message.
tar-tree deprecation: we eat our own dog food.
Add git-upload-archive to the main git man page
git-commit: cleanup unused function.
Fix usage string to match that given in the man page
Update the gitweb/README file to include setting the GITWEB_CONFIG environment
Conflicts:
gitweb/gitweb.perl
The new option makes the command's native output format to emit
output that is easier to handle by Porcelain.
Each line is output after a header. The header at the minimum
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 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.
Signed-off-by: Junio C Hamano <junkio@cox.net>
An author name like 'A. U. Thor <a.u.thor@example.com>" is not a
valid RFC 2822 address; when placing it on From: line, we would
need to quote it, like this:
Signed-off-by: "Junio C. Hamano" <junkio@cox.net>
The command picked up only Subject, CC, and From headers in the
incoming mbox text. Sending out patches prepared by
git-format-patch with user's custom headers was impossible with
that.
Just keep the ones it does not need to look at and add them to
the header of the message when sending it out.
Signed-off-by: Junio C Hamano <junkio@cox.net>
And introduce -x to expose (possibly) private commit object name
for people who cherry-pick between public branches.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This makes "git log/diff --summary" imply recursive behaviour,
whose effect is summarized in one test output:
--- a/t/t4013/diff.diff-tree_--pretty_--root_--summary_initial
+++ b/t/t4013/diff.diff-tree_--pretty_--root_--summary_initial
@@ -5,7 +5,7 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
- create mode 040000 dir
+ create mode 100644 dir/sub
create mode 100644 file0
create mode 100644 file2
$
When a file is created in a subdirectory, we used to say just
the directory name only when that directory also was created,
which did not make sense from two reasons. It is not any more
significant to create a new file in a new directory than to
create a new file in an existing directory, and even if it were,
reportinging the new directory name without saying the actual
filename is not useful.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This does not change any behaviour, but just separates out the
code to emit the initial part of the output of each line into a
separate function, since I'll be mucking with it further.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The new option makes the command's native output format show the
original line number in the blamed revision.
Note: the current implementation of find_orig_linenum involves
linear search through the line_map array every time. It should
probably build a reverse map upfront and do a simple look-up to
speed things up, but I'll leave it to more clever and beautiful
people ;-).
Signed-off-by: Junio C Hamano <junkio@cox.net>
The new option makes the command's native output format show the
filename even when there were no renames in its history, to make
it simpler for Porcelains to parse its output.
Signed-off-by: Junio C Hamano <junkio@cox.net>
It provides more useful information for causual Git users than the Git docs
(especially about where to get Git and such).
People can override with GITWEB_CONFIG if they want to.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Petr Baudis <pasky@suse.cz>
Minimize vertical table row padding for blame only. I
discovered this while having the browser's blame output
right next to my editor's window, only to notice how much
vertically stretched the blame output was.
Blame most likely shows source code and is in this way
more "spartan" than the rest of the tables gitweb shows.
This patch makes the blame table more vertically compact,
thus being closer to what you'd see in your editor's window,
as well as reusing more window estate to show more
information (which in turn minimizes scrolling).
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Do not print "log" and "shortlog" redundantly in commit
view. This is passed into the $extra argument of
git_print_page_nav from git_commit, but git_print_page_nav
prints "log" and "shortlog" already with the same head.
Noticed by Junio.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The deleted file should be labeled "renamed to" and the added file
"renamed from", not the other way around (duh!)
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
It is silly to keep using git-tar-tree in dist target when the
command gives a big deprecation warning when called. Instead,
use "git-archive --format=tar" which we recommend to our users.
Update gitweb's snapshot feature to use git-archive for the same
reason.
Signed-off-by: Junio C Hamano <junkio@cox.net>
If the administrator configures pathinfo to be overrideable by the
local repository a warning is shown.
Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This reduces the number of conflicts when rebasing after a series of
patches to the same piece of code is committed upstream.
Signed-off-by: Robert Shearman <rob@codeweavers.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This allows web sites with a header and footer standard for each page
to add them to the pages produced by gitweb.
Two new variables $site_header and $site_footer are defined (default
to null) each of which can specify a file containing the header and
footer html.
In addition, if the $stylesheet variable is undefined, a new array
@stylesheets (which defaults to a single element of gitweb.css) can be
used to specify more than one style sheet. This allows the clasical
gitweb.css styles to be retained, but a site wide style sheet used
within the header and footer areas.
Signed-off-by: Alan Chandler <alan@chandlerfamily.org.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Print commit-8 only on the first, leading row of
a commit block, to complement the per-commit block coloring.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Luben makes a good argument against it, and I agree with him in general.
The clickable handle that appear at seemingly random places makes them
look as if they are separating groups when it is not.
This also restores the executable bit I lost by mistake.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Still not managed to understand git-send-mail sufficiently well to not
accidently miss of this list when I sending it to Junio
Signed-off-by: Alan Chandler <alan@chandlerfamily.org.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When a repository is initialized long time ago with symbolic
HEAD, and "git-pack-refs --prune" is run, HEAD will be a
dangling symlink to refs/heads/ somewhere.
Running -e "$dir/HEAD" to guess if $dir is a git repository does
not give us the right answer anymore in such a case.
Also factor out two places that checked if the repository can be
exported with similar code into a call to a new function,
check_export_ok.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Instead of labelling each and every line with clickable commit
object name, this makes the blame output to show them only on
the first line of each group of lines from the same revision.
Placing too many lines in one group would make the commit object
name to appear too widely separated and also makes it consume
more memory, the number of lines in one group is capped to 20
lines or so.
Also it makes mouse-over to show the minimum authorship and
authordate information for extra cuteness ;-).
Signed-off-by: Junio C Hamano <junkio@cox.net>
Add a small apache configuration which shows how to use apache
to put gitweb and GIT repositories at the same URL.
Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Take a look at commit 20a3847d8a
using gitweb before this patch. This patch fixes this.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Fixes a failure to build the git-rev-parse manpage, seen with
asciidoc 8.0.0
We would love to use nicer quoting $$~$$ but alas asciidoc 7
does not know about it. So use asciidoc.conf and define {tilde}
to be ~.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
lock_ref_sha1_basic relies on errno beeing set to EISDIR by the
call to read() in resolve_ref() to detect directories. But calling
read() on a directory under NetBSD returns EPERM, and even succeeds
for local filesystems on FreeBSD.
Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Instead of providing the project as a ?p= parameter it is simply appended to
the base URI. All other parameters are appended to that, except for ?a=summary
which is the default and can be omitted.
The this can be enabled with the "pathinfo" feature in gitweb_config.perl.
[jc: let's introduce new features disabled by default not to
upset too many existing installations.]
Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Although most people would have one after colon if only for
readability, we never required it in git-parse-remote, so let's
not require one only in git-push.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The command updated the cache without invalidating the cache
tree entries while removing an existing entry.
Signed-off-by: Junio C Hamano <junkio@cox.net>
We advertised git-merge-recur for some time, and we planned to
support it for one release after we made it the 'recursive'.
However we forgot to install it nor have "make clean" clean it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
* jc/gitpm: (52 commits)
Remove -fPIC which was only needed for Git.xs
Git.pm: Kill Git.xs for now
Revert "Make it possible to set up libgit directly (instead of from the environment)"
Revert "Git.pm: Introduce fast get_object() method"
Revert "Convert git-annotate to use Git.pm"
Fix compilation with Sun CC
pass DESTDIR to the generated perl/Makefile
Eliminate Scalar::Util usage from private-Error.pm
Convert git-annotate to use Git.pm
Git.pm: Introduce fast get_object() method
Make it possible to set up libgit directly (instead of from the environment)
Work around sed and make interactions on the backslash at the end of line.
Git.pm: Introduce ident() and ident_person() methods
Convert git-send-email to use Git.pm
Git.pm: Add config() method
Use $GITPERLLIB instead of $RUNNING_GIT_TESTS and centralize @INC munging
INSTALL: a tip for running after building but without installing.
Perly Git: make sure we do test the freshly built one.
Git.pm: Don't #define around die
Git.xs: older perl do not know const char *
...
In particular it removes duplicate information, uses short hashes (as
git-log and company) and uses .. for fast forwarding commits and ... for
not-fast-forwarding commits (shorter, easier to copy&paste). It also
reformat the output as:
1. the ones we store in our local ref (either branches or tags):
1a) fast-forward
* refs/heads/origin: fast forward to branch 'master' of ../git/
old..new: 1ad7a06..bc1a580
1b) same (only shown under -v)
* refs/heads/next: same as branch 'origin/next' of ../git/
commit: ce47b9f
1c) non-fast-forward, forced
* refs/heads/pu: forcing update to non-fast forward branch 'pu' of ../git/
old...new: 7c733a8...5faa935
1d) non-fast-forward, did not update because not forced
* refs/heads/po: not updating to non-fast forward branch 'po' of ../git/
old...new: 7c733a8...5faa935
1e) creating a new local ref to store
* refs/tags/v1.4.2-rc4: storing tag 'v1.4.2-rc4' of ../git/
tag: 8c7a107
* refs/heads/next: storing branch 'next' of ../git/
commit: f8a20ae
2. the ones we do not store in our local ref (only shown under -v):
* fetched branch 'master' of ../git
commit: 695dffe
* fetched tag 'v1.4.2-rc4' of ../git
tag: 8c7a107
Signed-off-by: Santi B.ANijar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
* jc/diff-stat:
diff --stat: ensure at least one '-' for deletions, and one '+' for additions
diff --stat=width[,name-width]: allow custom diffstat output width.
diff --stat: color output.
diff --stat: allow custom diffstat output width.
* lt/web:
gitweb: tree view: hash_base and hash are now context sensitive
gitweb: History: blob and tree are first, then commitdiff, etc
gitweb: Remove redundant "commit" from history
gitweb: Don't use quotemeta on internally generated strings
gitweb: Add snapshot to shortlog
gitweb: Factor out gitweb_have_snapshot()
gitweb: Remove redundant "commit" link from shortlog
gitweb: "alternate" starts with shade (i.e. 1)
gitweb: Add history and blame to git_difftree_body()
gitweb: Remove excessively redundant entries from git_difftree_body
Revert "gitweb: extend blame to show links to diff and previous"
gitweb: Quote filename in HTTP Content-Disposition: header
gitweb: Add git_url subroutine, and use it to quote full URLs
gitweb: Split validate_input into validate_pathname and validate_refname
gitweb: Use "return" instead of "return undef" for some subs
gitweb: Strip trailing slashes from $path in git_get_hash_by_path
gitweb: extend blame to show links to diff and previous
gitweb: Remove redundant "tree" link
gitweb: tree view: eliminate redundant "blob"
In tree view, by default, hash_base is HEAD and hash is the
entry equivalent. Else the user had selected a hash_base or
hash, say by clicking on a revision or commit, in which case
those values are used.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Geert noticed that complete rewrite diff missed the usual a/ and b/
leading paths. Pickaxe says it never worked, ever.
Embarrassing.
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from bc1a580757 commit)
Somebody was wondering on #git channel why a git generated diff
does not apply with GNU patch when the filename contains a SP.
It is because GNU patch expects to find TAB (and trailing timestamp)
on ---/+++ (old_name and new_name) lines after the filenames.
The "diff --git" output format was carefully designed to be
compatible with GNU patch where it can, but whitespace
characters were always a pain.
We can make our output a bit more GNU patch friendly by adding an
extra TAB (but not trailing timestamp) to old/new name lines when
the filename as a SP in it. This updates git-apply to prepare
ourselves to accept such a patch, but we still do not generate
output that is patch friendly yet. That change needs to wait
until everybody has this change.
When a filename contains a real tab, "diff --git" format
always c-quotes it as discussed on the list with GNU patch
maintainer previously:
http://marc.theaimsgroup.com/?l=git&m=112927316408690&w=2
so there should be no downside.
Signed-off-by: Junio C Hamano <junkio@cox.net>