1
0
mirror of https://github.com/git/git.git synced 2024-10-05 23:11:20 +02:00
Commit Graph

6324 Commits

Author SHA1 Message Date
Junio C Hamano
700899b624 Merge branch 'sb/branch-attributes'
* sb/branch-attributes:
  Add test for the default merges in fetch.
  fetch: get the remote branches to merge from the branch properties
  Add t5510 to test per branch configuration affecting git-fetch.
  Fetch: default remote repository from branch properties
2006-09-24 19:20:26 -07:00
Junio C Hamano
043c04107c Merge branch 'jl/daemon'
* jl/daemon:
  Add virtualization support to git-daemon
2006-09-24 16:58:34 -07:00
Santi Béjar
6cc7c36d5e Add test for the default merges in fetch.
[jc: with minor fix-ups]

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-24 02:00:21 -07:00
Santi Béjar
5372806a84 fetch: get the remote branches to merge from the branch properties
If in branch "foo" and this in config:

[branch "foo"]
      merge=bar

"git fetch": fetch from the default repository and program the "bar"
             branch to be merged with pull.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-24 00:13:49 -07:00
Junio C Hamano
7be1d62c6f Add t5510 to test per branch configuration affecting git-fetch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-24 00:13:49 -07:00
Santi Béjar
648ad18f50 Fetch: default remote repository from branch properties
If in branch "foo" and this in config:

[branch "foo"]
       remote=bar

"git fetch" = "git fetch bar"
"git  pull" = "git pull  bar"

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-24 00:13:49 -07:00
Randal L. Schwartz
ed1795fcc5 builtin-upload-archive.c broken on openbsd
Looks like ctype again. Gotta be careful with that on BSD releases:

    $ gmake prefix=/opt/git all
    GIT_VERSION = 1.4.2.GIT
    gcc -o builtin-upload-archive.o -c -g -O2 -Wall -I/usr/local/include -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR builtin-upload-archive.c
    In file included from /usr/include/sys/poll.h:54,
                     from builtin-upload-archive.c:11:
    /usr/include/ctype.h:68: error: syntax error before ']' token
    /usr/include/ctype.h:69: error: syntax error before ']' token
    ...
    /usr/include/sys/poll.h:53:1: unterminated #ifndef
    /usr/include/sys/poll.h:28:1: unterminated #ifndef
    gmake: *** [builtin-upload-archive.o] Error 1

This fixes it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-24 00:00:47 -07:00
Petr Baudis
a2f3db2f5d gitweb: Consolidate escaping/validation of query string
Consider:

	http://repo.or.cz/?p=glibc-cvs.git;a=tree;h=2609cb0411389325f4ee2854cc7159756eb0671e;hb=2609cb0411389325f4ee2854cc7159756eb0671e

(click on the funny =__ify file)

We ought to handle anything in filenames and I actually see no reason why
we don't, modulo very little missing escaping that this patch hopefully
also fixes.

I have also made esc_param() escape [?=&;]. Not escaping [&;] was downright
buggy and [?=] just feels better escaped. ;-) YMMV.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-23 23:53:18 -07:00
Petr Baudis
8f41db8c37 Deprecate git-resolve.sh
Seriously, is anyone still using this thing? It's collecting dust and
blocking the name for something potentially useful like a tool for
user-friendly marking of resolved conflicts or resolving index conflicts.

We've loved you when Git was young, now thank you and please go away. ;-)

This makes git-resolve.sh print a big deprecation warning and sleep a bit
for extra annoyance. It should be removed completely after the next release.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-23 23:52:53 -07:00
Rene Scharfe
3fc8284e21 Rename builtin-zip-tree.c to archive-zip.c
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-23 14:00:32 -07:00
Rene Scharfe
31756c5da8 Remove git-zip-tree
git-zip-tree can be safely removed because it was never part of a formal
release.  This patch makes 'git-archive --format=zip' the one and only git
ZIP file creation command.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-23 14:00:27 -07:00
Robin Rosenberg
3d5c0cc938 Quote arguments to tr in test-lib
When there are single-character filenames in the test directory,
the shell tries to expand regexps meant for tr.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-22 17:00:36 -07:00
Petr Baudis
5c7d2cf3d6 Fix snapshot link in tree view
It would just give HEAD snapshot instead of one of the particular tree.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-22 16:59:22 -07:00
Petr Baudis
74d6166751 gitweb: Fix @git_base_url_list usage
As it is now, that array was never used because the customurl accessor was
broken and ''unless @url_list'' never happenned.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-22 16:59:04 -07:00
Petr Baudis
d726720743 gitweb: Fix tree link associated with each commit log entry.
The link forgot to have hb parameter and the resulting tree view
failed to show the navbar for that commit.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-22 16:58:51 -07:00
Petr Baudis
26d0a976e8 Make path in tree view look nicer
Based on talk on the IRC with Junio some evenings ago, I've updated the
path showing in tree view to look better and sent updated patches
privately, but it seems the old version ended up being used, so here's
the new one again.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-22 16:49:36 -07:00
Petr Baudis
f35274dad8 gitweb: Relabel "head" as "HEAD"
"head" is a reference in refs/heads/, while those labels mean HEAD,
the latest revision of the default branch.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 21:21:04 -07:00
Petr Baudis
35329cc1cc gitweb: Rename "plain" labels to "raw"
I don't have much preference either way and as far as I'm concerned, it may
go the other way as well. Consistency is what is important.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 21:18:26 -07:00
Petr Baudis
6ef4cb2e8d gitweb: Link to associated tree from a particular log item in full log view
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 21:01:28 -07:00
Petr Baudis
1d62be25ed gitweb: Link to latest tree from the head line in heads list
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 21:00:51 -07:00
Petr Baudis
35749ae566 gitweb: Link to tree instead of snapshot in shortlog
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 20:58:50 -07:00
Petr Baudis
cae1862a3b gitweb: More per-view navigation bar links
Navigation bars in various views were empty or missed important items that
should have been there, e.g. getting a snapshot in tree view or log of
ancestry in commit view...

This feeble patch attempts to consolidate that.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 20:57:43 -07:00
Petr Baudis
609ff267fb gitweb: Link (HEAD) tree for each project from projects list
Current projects list is oriented on easily getting "what's new"
information. But when already using gitweb as an interface to something,
I personally find myself to _much_ more frequently wanting to rather
see "what's in" (or "what's new in") and it's quite annoying to have to
go through the summary page (which is also rather expensive to generate)
just to get there.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 20:56:33 -07:00
Jakub Narebski
1d782b03b0 gitweb: Make git_get_hash_by_path check type if provided
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 12:55:51 -07:00
Petr Baudis
16fdb4882e Fix showing of path in tree view
This patch fixes two things - links to all path elements except the last
one were broken since gitweb does not like the trailing slash in them, and
the root tree was not reachable from the subdirectory view.

To compensate for the one more slash in the front, the trailing slash is
not there anymore. ;-) I don't care if it stays there though.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 01:16:45 -07:00
Martin Waitz
053d62bb5b gitweb: fix display of trees via PATH_INFO.
When adding a / to the URL, git should display the corresponding
tree object, but it has to remove the / first.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21 01:15:23 -07:00
Johannes Schindelin
199a92186b Document receive.denyNonFastforwards
[jc: with a fix to config handling in t5400 test, which took
 annoyingly long to diagnose.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 23:32:22 -07:00
Johannes Schindelin
9edd7e4652 receive-pack: plug memory leak in fast-forward checking code.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 22:37:50 -07:00
Johannes Schindelin
11031d7e9f add receive.denyNonFastforwards config variable
If receive.denyNonFastforwards is set to true, git-receive-pack will deny
non fast-forwards, i.e. forced updates. Most notably, a push to a repository
which has that flag set will fail.

As a first user, 'git-init-db --shared' sets this flag, since in a shared
setup, you are most unlikely to want forced pushes to succeed.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 16:15:45 -07:00
Junio C Hamano
7dd45e15c2 sha1_name.c: understand "describe" output as a valid object name
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 16:11:08 -07:00
Junio C Hamano
e49521b56d Make hexval() available to others.
builtin-mailinfo.c has its own hexval implementaiton but it can
share the table-lookup one recently implemented in sha1_file.c

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 16:08:14 -07:00
Jon Loeliger
49ba83fb67 Add virtualization support to git-daemon
Signed-off-by: Jon Loeliger
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 11:15:39 -07:00
Jakub Narebski
62e27f273d gitweb: Fix thinko in git_tags and git_heads
git_get_refs_list always return reference to list (and reference to
hash which we ignore), so $taglist (in git_tags) and $headlist (in
git_heads) are always defined, but @$taglist / @$headlist might be
empty. Replaced incorrect "if (defined @$taglist)" with
"if (@$taglist)" in git_tags and respectively in git_heads.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 10:26:08 -07:00
Jakub Narebski
120ddde2a8 gitweb: Make git_get_refs_list do work of git_get_references
Make git_get_refs_list do also work of git_get_references, to avoid
calling git-peek-remote twice.  Change meaning of git_get_refs_list
meaning: it is now type, and not a full path, e.g. we now use
git_get_refs_list("heads") instead of former
git_get_refs_list("refs/heads").

Modify git_summary to use only one call to git_get_refs_list instead
of one call to git_get_references and two to git_get_refs_list.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 10:26:05 -07:00
Jakub Narebski
9704d75ddc gitweb: Always use git-peek-remote in git_get_references
Instead of trying to read info/refs file, which might not be present
(we did fallback to git-ls-remote), always use git-peek-remote in
git_get_references.

It is preparation for git_get_refs_info to also return references
info.  We should not use info/refs for git_get_refs_info as the
repository is not served for http-fetch clients.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 10:24:44 -07:00
Jakub Narebski
d04d3d424b gitweb: Require project for almost all actions
Require that project (repository) is given for all actions except
project_list, project_index and opml.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 09:49:39 -07:00
Jakub Narebski
cd90e75ff4 gitweb: Even more support for PATH_INFO based URLs
Now the following types of path based URLs are supported:

* project              overview (summary) page of project
* project/branch       shortlog of branch
* project/branch:file  file in branch, blob_plain view
* project/branch:dir/  directory listing of dir in branch, tree view

The following shortcuts works (see explanation below):

* project/branch:      directory listing of branch, main tree view
* project/:file        file in HEAD (raw)
* project/:dir/        directory listing of dir in HEAD
* project/:            directory listing of project's HEAD

We use ':' as separator between branch (ref) name and file name
(pathname) because valid branch (ref) name cannot have ':' inside.
This limit applies to branch name only. This allow for hierarchical
branches e.g. topic branch 'topic/subtopic', separate remotes
tracking branches e.g. 'refs/remotes/origin/HEAD', and discriminate
between head (branch) and tag with the same name.

Empty branch should be interpreted as HEAD.

If pathname (the part after ':') ends with '/', we assume that pathname
is name of directory, and we want to show contents of said directory
using "tree" view. If pathname is empty, it is equivalent to '/' (top
directory).

If pathname (the part after ':') does not end with '/', we assume that
pathname is name of file, and we show contents of said file using
"blob_plain" view.

Pathname is stripped of leading '/', so we can use ':/' to separate
branch from pathname. The rationale behind support for PATH_INFO based
URLs was to support project web pages for small projects: just create
an html branch and then use an URL like
  http://nowhere.com/gitweb.cgi/project.git/html:/index.html
The ':/' syntax allow for working links between .html files served
in such way, e.g. <a href="main.html"> link inside "index.html"
would get
  http://nowhere.com/gitweb.cgi/project.git/html:/main.html.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 09:49:31 -07:00
Jonas Fonseca
44d2775a98 gitk(1): mention --all
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 09:00:14 -07:00
Jonas Fonseca
45ad9b5096 Fix trivial typos and inconsistencies in hooks documentation
Pointed out by Alan Chandler.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 08:36:12 -07:00
Jakub Narebski
8059319acc gitweb: Fix mimetype_guess_file for files with multiple extensions
Fix getting correct mimetype for "blob_plain" view for files which have
multiple extensions, e.g. foo.1.html; now only the last extension
is used to find mimetype.

Noticed by Martin Waitz.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 07:54:29 -07:00
Art Haas
c774b2dcf6 Patch for http-fetch.c and older curl releases
Older curl releases do not define CURLE_HTTP_RETURNED_ERROR, they
use CURLE_HTTP_NOT_FOUND instead. Newer curl releases keep the
CURLE_HTTP_NOT_FOUND definition but using a -DCURL_NO_OLDIES
preprocessor flag the old name will not be present in the 'curl.h'
header.

This patch makes our code written for newer releases of the curl
library but allow compiling against an older curl (older than
0x070a03) by defining the missing CURLE_HTTP_RETURNED_ERROR as a
synonym for CURLE_HTTP_NOT_FOUND.

Signed-off-by: Art Haas <ahaas@airmail.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 07:53:43 -07:00
Junio C Hamano
808239a7db Merge branch 'sk/ftp'
* sk/ftp:
  Add ftp:// protocol support for git-http-fetch
  http-fetch.c: consolidate code to detect missing fetch target
2006-09-17 18:43:36 -07:00
Junio C Hamano
7f0f4fa437 Merge part of branch 'jc/upload-pack' 2006-09-17 18:42:33 -07:00
Junio C Hamano
4405fb77f4 Merge branch 'jc/pack'
* jc/pack:
  pack-objects: document --revs, --unpacked and --all.
  pack-objects --unpacked=<existing pack> option.
  pack-objects: further work on internal rev-list logic.
  pack-objects: run rev-list equivalent internally.
  Separate object listing routines out of rev-list
2006-09-17 18:32:03 -07:00
Junio C Hamano
2874172101 Merge branch 'jc/am'
* jc/am:
  Fix git-am safety checks
2006-09-17 18:20:02 -07:00
Junio C Hamano
b467fb0b90 Merge branch 'jk/diff'
* jk/diff:
  wt-status: remove extraneous newline from 'deleted:' output
  git-status: document colorization config options
  Teach runstatus about --untracked
  git-commit.sh: convert run_status to a C builtin
  Move color option parsing out of diff.c and into color.[ch]
  diff: support custom callbacks for output
2006-09-17 18:14:03 -07:00
Matthias Lederhofer
ac8e3f2bb8 gitweb fix validating pg (page) parameter
Currently it is possible to give any string ending with a number as
page.  -1 for example is quite bad (error log shows probably 100
warnings).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-17 15:10:23 -07:00
Jonas Fonseca
02ac04fc9f git-repack(1): document --window and --depth
Copy and pasted from git-pack-objects(1).

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-17 15:10:07 -07:00
Jonas Fonseca
f58bb6fb41 git-apply(1): document --unidiff-zero
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-17 15:08:29 -07:00
Matthias Lederhofer
645927cec8 gitweb: fix warnings in PATH_INFO code and add export_ok/strict_export
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-17 14:47:46 -07:00