1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-18 06:54:55 +01:00
Commit graph

10894 commits

Author SHA1 Message Date
Nick Hengeveld
1d389ab65d Add support for parallel HTTP transfers
Add support for parallel HTTP transfers.  Prefetch populates a queue of
objects to transfer and starts feeding requests to an active request
queue for processing; fetch_object keeps the active queue moving
while the specified object is being transferred.  The size of the active
queue can be restricted using -r and defaults to 5 concurrent transfers.
Requests for objects that are not prefetched are also processed via the
active queue.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 23:22:01 -07:00
Junio C Hamano
340e4f88c0 Remove empty directories after read-tree -u.
This fixes everybody's favorite gripe that switching branche with
'git checkout' leaves empty directories.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 17:34:08 -07:00
Linus Torvalds
17712991a5 Add ".git/config" file parser
This is a first cut at a very simple parser for a git config file.

The format of the file is a simple ini-file like thing, with simple
variable/value pairs. You can (and should) make the variables have a
simple single-level scope, ie a valid file looks something like this:

	#
	# This is the config file, and
	# a '#' or ';' character indicates
	# a comment
	#

	; core variables
	[core]
		; Don't trust file modes
		filemode = false

	; Our diff algorithm
	[diff]
		external = "/usr/local/bin/gnu-diff -u"
		renames = true

which parses into three variables: "core.filemode" is associated with the
string "false", and "diff.external" gets the appropriate quoted value.

Right now we only react to one variable: "core.filemode" is a boolean that
decides if we should care about the 0100 (user-execute) bit of the stat
information. Even that is just a parsing demonstration - this doesn't
actually implement that st_mode compare logic itself.

Different programs can react to different config options, although they
should always fall back to calling "git_default_config()" on any config
option name that they don't recognize.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 16:31:08 -07:00
Junio C Hamano
e858862fd9 Merge branch 'fixes' 2005-10-10 16:17:02 -07:00
Junio C Hamano
b12bbd5986 Merge branch 'fixes'
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 16:03:43 -07:00
Christian Meder
cc1621e2a0 The synopsis of the manpages should use the hyphenated version
The synopsis of the manpages should use the hyphenated version of the git
commands. Adapt the remaining offenders.

Signed-off-by: Christian Meder <chris@absolutegiganten.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 16:01:32 -07:00
Christian Meder
72e9340cfd Convert usage of GIT and Git into git
Convert usage of GIT and Git into git.

Signed-off-by: Christian Meder <chris@absolutegiganten.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 16:01:31 -07:00
Junio C Hamano
98438bd0e8 Remove the version tags from the manpages
Signed-off-by: Christian Meder <chris@absolutegiganten.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 14:49:52 -07:00
H. Peter Anvin
f336af1711 Make rsh.c use sq_quote_buf()
Make rsh.c use sq_quote_buf()

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 14:46:14 -07:00
H. Peter Anvin
977ed47d86 Trivial optimization
GIT_DIR_ENVIRONMENT is always a string literal

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 14:46:12 -07:00
H. Peter Anvin
77d604c309 Enhanced sq_quote()
Create function to sq_quote into a buffer
Handle !'s for csh-based shells

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 14:46:10 -07:00
Johannes Schindelin
18e410f1ea t5400-send-pack relies on a working cpio
Since cygwin does not install cpio by default, t5400 results in a very
cryptic failure. So, test for cpio explicitely.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 14:14:22 -07:00
Jonas Fonseca
d9c74a808e git.sh: quote all paths
This makes it handle spaces in paths.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 14:14:06 -07:00
Johannes Schindelin
d52920e397 Teach git-status about spaces in file names also on MacOSX
Not all sed understands '\t' and consequently cuts off every
file name at the first "t" (or backslash...).

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 13:58:52 -07:00
Junio C Hamano
4769948afe Deal with $(bindir) and friends with whitespaces.
... using HPA's shellquote macro.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 13:51:52 -07:00
Junio C Hamano
5fb41e8abf OpenBSD needs the strcasestr replacement.
Noticed by Randal L. Schwartz.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 11:51:11 -07:00
Matthias Urlichs
8470b7f3a3 svn import: get all revisions
Not skipping the last revision is generally seen as Good Thing. ;-)

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 20:10:48 +02:00
Matthias Urlichs
22dcbb7512 svn import: unlink downlaoded files
Actually removing the files that have been checked out of SVN,
after checking them into git of course, is a good idea...

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 18:54:53 +02:00
Matthias Urlichs
3ef378a67b svn import: Add a loop limit option
The svn library has a serious memory leak.
Added a new option (-l NUM) which causes git-svnimport to exit cleanly
after fetching that many changes, in order to .

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 18:45:00 +02:00
Matthias Urlichs
e7e477dfac svn import: incremental imports
Incremental imports skipped a revision.

Also improve interrupt safety -- ^C while writing a tag caused the tag
to be skipped.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 15:28:00 +02:00
Matthias Urlichs
7ee74a99b2 svn import: skip initial revisions
Add a flag to skip initial revisions: some SVN repositories have
initial setup cruft in their logs which we might want to ignore.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 15:14:21 +02:00
Matthias Urlichs
bf267d99e8 svn import: Do not create empty tags
If a tag is "clean", do not create a commit for it.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 14:51:13 +02:00
Matthias Urlichs
f02b3eba7f svn import: Fix tagging.
Tagging was 100% broken. :-/

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 14:42:59 +02:00
Matthias Urlichs
62d72e4b70 svn import: remove debugging
Removed debugging output used to identify the too-many-connections problem.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 14:19:15 +02:00
Matthias Urlichs
c7ff5f1d7d svn import: wrong file open mode
There are multiple | characters in Unicode. Don't use the wrong one ...

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 14:18:38 +02:00
Matthias Urlichs
8cd4177d5e svn import: avoid reconnecting
Perl's eval() sets $@ to empts, not undef, when it succeeds.
That caused excessive reconnect attempts.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 14:14:44 +02:00
Matthias Urlichs
37dcf6de60 svn improt needs SVN::Core 1.2.1 or better
Die with a warning if Perl's svn module is too old.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 13:42:48 +02:00
Matthias Urlichs
c6582aba52 svn import: add libsvn-core-perl to Debian's control file
Added libsvn-core-perl to debian/control, "Recommends:" section.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 13:10:01 +02:00
Matthias Urlichs
6d281217b9 svn import: fixed two pipe open calls.
Perl's magic "different semantics of open() based on the number of
arguments" is really annoying at times...

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 12:45:46 +02:00
Matthias Urlichs
f0daa628a2 svn import: copy path information
Due to a bug in the SVN library, path information is freed as soon as the
callback returns, even if it still refers to the data.

Workaround: Copy it. (Also fix a wrong-method-name bug while we're at it.)

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 12:41:15 +02:00
Matthias Urlichs
c015bf2bcb SVN import: No modes
svn doesn't seem to save file modes:
removed the code that analyzes them.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 12:34:32 +02:00
Matthias Urlichs
2b5e63d1b4 svn import: add eval()
Trying to downlaod a file that's really a subdirectory doesn't work too well.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 12:33:22 +02:00
Matthias Urlichs
eaf718f3ec New: git-svnimport.
As the name suggests, this script imports from SVN.

Only "normal" SVN repositories (with single trunk/, branches/, and tags/
subdrectories) are supported. Incremental imports require preserving
the file .git/svn2git.

Signed-Off-by: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 11:40:43 +02:00
Matthias Urlichs
89764f5d8b cvsimport: report merge parents
Matching and reporting merge parents happens in a subprocess.
Re-open stdout before redirecting stdout to the pipe, so that printing
verbose messages doesn't go to the wrong place.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
2005-10-10 11:15:09 +02:00
Junio C Hamano
899460f336 Also force LC_ALL in test scripts.
Noticed by Junichi Uekawa.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 21:58:02 -07:00
Junio C Hamano
32e49d5d1c GIT 0.99.8c
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 19:19:36 -07:00
Junio C Hamano
2af60a0521 Merge branch 'fixes' 2005-10-09 19:17:43 -07:00
Junio C Hamano
d5b0c9ea17 Merge branch 'fixes'
with minor hand resolving on git-tag.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 19:16:33 -07:00
Junio C Hamano
fb8024b414 git-tag: update usage string and documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 19:13:47 -07:00
Santi_Béjar
f8e2c54c9a Write .editmsg in GIT_DIR to avoid being in git-status.
It appears in the git-status output during a git-commit if you have
something in info/exclude.

Also for .cmitmsg and .cmitchk to make git-commit work
in read-only working trees.

[jc: while we are at it, I removed the use of .cmitchk temporary
     file which was not necessary, and renamed them -- they are out
     of way now and do not have to be dotfiles anymore.]

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 17:30:19 -07:00
Kai Ruemmler
9fabdedc0e ignore new git-diff index header when computing patch ids
Two else equal patches should not result in different checksums, only
because they were applied to different versions of the file.

Signed-off-by:  Kai Ruemmler <kai.ruemmler@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 16:52:50 -07:00
Paolo 'Blaisorblade' Giarrusso
5a6850e8aa Fix git-verify-tag for light-weight tags
It currently exits printing "git-cat-file SHA1: bad file", while
instead we must just abort the verification for light-weight
tags (e.g. referring to commit objects).

[jc: tag objects can tag anything not just commits, so I fixed
 up the original patch slightly.  you should be able to validate
 a signed tag that points at a blob object. ]

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 16:50:34 -07:00
Junio C Hamano
f7c153431b Makefile: avoid error message from 'uname -o'
The platform specific tweaking part was using 'uname -o' which
is not always available.  Squelch error message from it.

It was suggested to chain the if..else, but I chose not to, because
maintaining the nested if..else if..else..endif endif to match is a
pain.  If we had "elif", things would have been different, though.
While we are at it, try not to invoke 'uname -s' for each platform
candidate.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 12:55:49 -07:00
Junio C Hamano
8c51242873 Make sure 'make install' does not have to rebuild templates.
The dependency rule in templates directory forced 'make install'
that immediately followed 'make all' to rebuild boilerplates.
This was problematic for a workflow that built first as yourself
and then installed as root, from a working tree that is on an
NFS mounted filesystem that is unwritable by root.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-09 02:58:35 -07:00
Kai Ruemmler
d2b8593fd3 make $prefix available for sub-makefiles
exports $prefix and makes Documentation/Makefile following it also.

Signed-off-by: Kai Ruemmler <kai.ruemmler@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08 15:54:37 -07:00
Junio C Hamano
f48000fcbe Yank writing-back support from gitfakemmap.
We do not write through our use of mmap(), so make sure callers pass
MAP_PRIVATE and remove support for writing changes back.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08 15:54:36 -07:00
Johannes Schindelin
730d48a2ef [PATCH] If NO_MMAP is defined, fake mmap() and munmap()
Since some platforms do not support mmap() at all, and others do only just
so, this patch introduces the option to fake mmap() and munmap() by
malloc()ing and read()ing explicitely.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
2005-10-08 15:54:36 -07:00
Junio C Hamano
d119e3de13 Also use 'track_object_refs = 0' in update-server-info.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08 15:54:35 -07:00
robfitz@273k.net
f22ca7c50d Reduce memory usage in git-update-server-info.
Modify parse_object_cheap() to also free all the entries from the tree
data structures.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08 15:54:35 -07:00
Linus Torvalds
230f13225d Create object subdirectories on demand
This makes it possible to have a "sparse" git object subdirectory
structure, something that has become much more attractive now that people
use pack-files all the time.

As a result of pack-files, a git object directory doesn't necessarily have
any individual objects lying around, and in that case it's just wasting
space to keep the empty first-level object directories around: on many
filesystems the 256 empty directories will be aboue 1MB of diskspace.

Even more importantly, after you re-pack a project that _used_ to be
unpacked, you could be left with huge directories that no longer contain
anything, but that waste space and take time to look through.

With this change, "git prune-packed" can just do an rmdir() on the
directories, and they'll get removed if empty, and re-created on demand.

This patch also tries to fix up "write_sha1_from_fd()" to use the new
common infrastructure for creating the object files, closing a hole where
we might otherwise leave half-written objects in the object database.

[jc: I unoptimized the part that really removes the fan-out directories
 to ease transition.  init-db still wastes 1MB of diskspace to hold 256
 empty fan-outs, and prune-packed rmdir()'s the grown but empty directories,
 but runs mkdir() immediately after that -- reducing the saving from 150KB
 to 146KB.  These parts will be re-introduced when everybody has the
 on-demand capability.]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08 15:54:01 -07:00