Commit Graph

6790 Commits

Author SHA1 Message Date
Petr Baudis
55ff35cb64 Show snapshot link in shortlog only if have_snapsho
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-07 01:38:46 -07:00
Yasushi SHOJI
847abc0f2a gitweb: refactor decode() for utf8 conversion
we already had a few place using decode() to convert perl internal
encode to utf8.  added a new thin wrapper to do just that.

Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-06 02:56:50 -07:00
Dennis Stosberg
3df196716e Add default values for --window and --depth to the docs
Currently, you actually have to read the source to find out the
default values. While at it, fix two typos and suggest that these
options actually take a parameter in git-pack-objects.txt.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-06 02:53:39 -07:00
Dennis Stosberg
26e5fc3415 Remove bashism from t3210-pack-refs.sh
This bashism makes the test fail if /bin/sh is not bash.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-06 02:52:37 -07:00
Junio C Hamano
eeef88cd20 gitweb: use blame --porcelain
This makes gitweb (git_blame2) use "blame --porcelain", which
lets the caller to figure out which line in the original version
each line comes from.  Using this information, change the
behaviour of clicking the line number to go to the line of the
blame output for the original commit.

Before, clicking the line number meant "scoll up to show this
line at the beginning of the page", which was not all that
useful.  The new behaviour lets you click on the line you are
interested in to view the line in the context it was introduced,
and keep digging deeper as you examine it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-06 00:16:09 -07:00
Junio C Hamano
4b4a5dbb17 Merge branch 'jc/blame' into jc/web-blame
* 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
2006-10-06 00:16:05 -07:00
Junio C Hamano
b5c698d947 git-blame --porcelain
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>
2006-10-06 00:13:25 -07:00
Junio C Hamano
7a2a0d2141 git-send-email: real name with period need to be dq-quoted on From: line
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>
2006-10-05 23:40:15 -07:00
Junio C Hamano
ab2a1a32ff ref-log: allow ref@{count} syntax.
Often I find myself wanting to say 'tip of "next" before I
merged the last three topics'.  Now I can say that with:

	git log next@{3}..next

Since small integers alone are invalid input strings to
approxidate, there is no fear of confusion.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05 23:17:11 -07:00
Junio C Hamano
ce91c2f653 git-send-email: do not drop custom headers the user prepared
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>
2006-10-05 23:13:26 -07:00
Junio C Hamano
abd6970aca cherry-pick: make -r the default
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>
2006-10-05 17:54:14 -07:00
Junio C Hamano
bc108f63da git-send-email: avoid uninitialized variable warning.
The code took length of $reply_to when it was not even defined,
causing -w to warn.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05 16:36:15 -07:00
Johannes Schindelin
d7014dc081 Turn on recursive with --summary
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>
2006-10-05 15:10:40 -07:00
Junio C Hamano
c137f40f8a blame.c: move code to output metainfo into a separate function.
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>
2006-10-05 15:05:41 -07:00
Junio C Hamano
cf54a029ff git-blame: --show-number (and -n)
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>
2006-10-05 15:05:41 -07:00
Junio C Hamano
eb93b72406 git-blame: --show-name (and -f)
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>
2006-10-05 15:05:41 -07:00
Junio C Hamano
506e49ff9f blame.c: whitespace and formatting clean-up.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05 15:05:41 -07:00
Junio C Hamano
51a7c66a73 gitweb: Make the Git logo link target to point to the homepage
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>
2006-10-05 15:02:13 -07:00
Luben Tuikov
db94b41aee gitweb: blame: Minimize vertical table row padding
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>
2006-10-05 14:21:12 -07:00
Luben Tuikov
6e0e92fda8 gitweb: Do not print "log" and "shortlog" redundantly in commit view
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>
2006-10-05 13:05:00 -07:00
Alexandre Julliard
13f8e0b24b vc-git.el: Switch to using git-blame instead of git-annotate.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05 09:09:13 -07:00
Alexandre Julliard
c530c5aa31 git.el: Fixed inverted "renamed from/to" message.
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>
2006-10-05 02:31:01 -07:00
Junio C Hamano
9ccb64c8e0 tar-tree deprecation: we eat our own dog food.
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>
2006-10-05 02:26:12 -07:00
Franck Bui-Huu
6030649591 Add git-upload-archive to the main git man page
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05 01:57:18 -07:00
Martin Waitz
a945591906 gitweb: warn if feature cannot be overridden.
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>
2006-10-04 23:02:31 -07:00
Junio C Hamano
422b4a0e03 pack-refs: call fflush before fsync.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-04 21:37:15 -07:00
Robert Shearman
b758789c20 git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase.
Signed-off-by: Robert Shearman <rob@codeweavers.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-04 15:02:04 -07:00
Robert Shearman
91b489776c git-rebase: Use --ignore-if-in-upstream option when executing git-format-patch.
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>
2006-10-04 15:02:04 -07:00
Alan Chandler
b2d3476e15 Gitweb - provide site headers and footers
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>
2006-10-04 15:00:49 -07:00
Luben Tuikov
c8aeaaf7fc gitweb: blame: Mouse-over commit-8 shows author and date
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-04 14:56:50 -07:00
Luben Tuikov
9dc5f8c9c2 gitweb: blame: print commit-8 on the leading row of a commit-block
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>
2006-10-04 14:56:13 -07:00
Junio C Hamano
9074484a2b Revert 954a618375
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>
2006-10-04 14:55:16 -07:00
Martin Waitz
c065b6e429 git-commit: cleanup unused function.
The report() function is not used anymore. Kill it.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-03 23:58:38 -07:00
Alan Chandler
281e67d6fa Fix usage string to match that given in the man page
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>
2006-10-03 23:58:38 -07:00
Alan Chandler
604cb211a9 Update the gitweb/README file to include setting the GITWEB_CONFIG environment
Signed-off-by: Alan Chandler <alan@chandlerfamily.org.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-03 23:58:38 -07:00
Junio C Hamano
2172ce4b01 gitweb: prepare for repositories with packed refs.
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>
2006-10-03 02:30:47 -07:00
Junio C Hamano
03a182107f pack-refs: use lockfile as everybody else does.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-03 02:15:18 -07:00
Junio C Hamano
47292d65de git-fetch: do not look into $GIT_DIR/refs to see if a tag exists.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-03 02:08:19 -07:00
Junio C Hamano
954a618375 gitweb: make leftmost column of blame less cluttered.
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>
2006-10-03 01:10:03 -07:00
Martin Waitz
128eead198 gitweb: document webserver configuration for common gitweb/repo URLs.
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>
2006-10-03 01:09:56 -07:00
Luben Tuikov
e70866f53a gitweb: Escape ESCAPE (\e) character
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>
2006-10-03 01:04:41 -07:00
Junio C Hamano
54bd25580e escape tilde in Documentation/git-rev-parse.txt
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 &#126;.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-10-03 01:04:19 -07:00
Robin Rosenberg
b599deec18 Error in test description of t1200-tutorial
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-03 01:02:27 -07:00
Dennis Stosberg
cb626bc630 lock_ref_sha1_basic does not remove empty directories on BSD
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>
2006-10-03 01:02:27 -07:00
Junio C Hamano
ff989b8d46 Merge branch 'master' into lj/refs
* master: (99 commits)
  lock_ref_sha1_basic does not remove empty directories on BSD
  git-push: .git/remotes/ file does not require SP after colon
  git-mv: invalidate the removed path properly in cache-tree
  Makefile: install and clean merge-recur, still.
  GIT 1.4.3-rc1
  gitweb: tree view: hash_base and hash are now context sensitive
  git-diff -B output fix.
  fetch: Reset remote refs list each time fetch_main is called
  Remove -fPIC which was only needed for Git.xs
  Fix approxidate() to understand 12:34 AM/PM are 00:34 and 12:34
  git-diff -B output fix.
  Make cvsexportcommit remove files.
  diff --stat: ensure at least one '-' for deletions, and one '+' for additions
  diff --stat=width[,name-width]: allow custom diffstat output width.
  gitweb: History: blob and tree are first, then commitdiff, etc
  gitweb: Remove redundant "commit" from history
  http/ftp: optionally ask curl to not use EPSV command
  gitweb: Don't use quotemeta on internally generated strings
  gitweb: Add snapshot to shortlog
  gitweb: Factor out gitweb_have_snapshot()
  ...
2006-10-02 11:49:59 -07:00
Dennis Stosberg
7a21632fa3 lock_ref_sha1_basic does not remove empty directories on BSD
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>
2006-10-02 11:49:45 -07:00
Martin Waitz
9e756904d0 gitweb: start to generate PATH_INFO URLs.
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>
2006-10-02 00:49:42 -07:00
Junio C Hamano
f5961572a0 Merge branch 'maint'
* maint:
  git-push: .git/remotes/ file does not require SP after colon
  git-mv: invalidate the removed path properly in cache-tree
2006-10-02 00:47:32 -07:00
Junio C Hamano
6fe5b7ff6c git-push: .git/remotes/ file does not require SP after colon
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>
2006-10-02 00:43:52 -07:00
Junio C Hamano
4fddf5798d git-mv: invalidate the removed path properly in cache-tree
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>
2006-10-01 23:32:39 -07:00