1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-20 21:49:44 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
Linus Torvalds 3381c790e5 Make "--parents" logs also be incremental
The parent rewriting feature caused us to create the whole history in one
go, and then simplify it later, because of how rewrite_parents() had been
written. However, with a little tweaking, it's perfectly possible to do
even that one incrementally.

Right now, this doesn't really much matter, because every user of
"--parents" will probably generally _also_ use "--topo-order", which will
cause the old non-incremental behaviour anyway. However, I'm hopeful that
we could make even the topological sort incremental, or at least
_partially_ so (for example, make it incremental up to the first merge).

In the meantime, this at least moves things in the right direction, and
removes a strange special case.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-08 23:37:21 -07:00
Peter Eriksen 90321c106c Replace xmalloc+memset(0) with xcalloc.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 00:11:19 -07:00
Rene Scharfe ec26b4d6b0 Fix sparse warnings about non-ANSI function prototypes
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-02 12:58:47 -07:00
Junio C Hamano 8c9e7947c2 http-push.c: squelch C90 warnings.
If you write code after declarations in a block, gcc scolds you
with "warning: ISO C90 forbids mixed declarations and code".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-21 15:50:18 -08:00
Nick Hengeveld a3c57c9adb http-push: don't assume char is signed
Declare remote_dir_exists[] as signed char to be sure that values of -1
are valid.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-20 14:38:58 -08:00
Nick Hengeveld 3dfaf7bcfd http-push: add support for deleting remote branches
Processes new command-line arguments -d and -D to remove a remote branch
if the following conditions are met:
- one branch name is present on the command line
- the specified branch name matches exactly one remote branch name
- the remote HEAD is a symref
- the specified branch is not the remote HEAD
- the remote HEAD resolves to an object that exists locally (-d only)
- the specified branch resolves to an object that exists locally (-d only)
- the specified branch is an ancestor of the remote HEAD (-d only)

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-20 14:38:47 -08:00
Nick Hengeveld 1a703cba6d http-push: cleanup
More consistent usage string, condense push output, remove extra slashes
in URLs, fix unused variables, include HTTP method name in failure
messages.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-10 23:01:56 -08:00
Nick Hengeveld 197e8951ab http-push: support for updating remote info/refs
If info/refs exists on the remote, get a lock on info/refs, make sure that
there is a local copy of the object referenced in each remote ref (in case
someone else added a tag we don't have locally), do all the refspec updates,
and generate and send an updated info/refs file.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-10 23:01:54 -08:00
Nick Hengeveld 512d632cf2 http-push: improve remote lock management
Associate the remote locks with the remote repo, add a function to check
and refresh all current locks.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-10 23:01:52 -08:00
Nick Hengeveld 3030baa7f0 http-push: refactor remote file/directory processing
Replace single-use functions with one that can get a list of remote
collections and pass file/directory information to user-defined functions
for processing.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-10 23:01:50 -08:00
Nick Hengeveld baa7b67d09 HTTP slot reuse fixes
Incorporate into http-push a fix related to accessing slot results after
the slot was reused, and fix a case in run_active_slot where a
finished slot wasn't detected if the slot was reused.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-10 23:01:48 -08:00
Nick Hengeveld 5241bfe6d1 http-push: fix revision walk
The revision walk was not including tags because setup_revisions zeroes out
the revs flags.  Pass --objects so it picks up all the necessary bits.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-10 23:01:45 -08:00
Nick Hengeveld aa1dbc9897 Update http-push functionality
This brings http-push functionality more in line with the ssh/git version,
by borrowing bits from send-pack and rev-list to process refspecs and
revision history in more standard ways.  Also, the status of remote objects
is determined using PROPFIND requests for the object directory rather than
HEAD requests for each object - while it may be less efficient for small
numbers of objects, this approach is able to get the status of all remote
loose objects in a maximum of 256 requests.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-07 17:03:21 -08:00
Junio C Hamano 9cac9d3689 Merge branch 'jc/subdir' 2005-11-30 11:09:33 -08:00
Nick Hengeveld 3e9fabc85e http-push cleanup
The malloc patch from Jan Andres fixed the problem that was causing a
segfault when freeing the lock token, and Johannes Schindelin found
and fixed a problem when no URL is specified on the command line.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-29 10:51:39 -08:00
Junio C Hamano 5a3277133d Make networking commands to work from a subdirectory.
These are whole-tree operations and there is not much point
making them operable from within a subdirectory, but it is easy
to do so, and using setup_git_directory() upfront helps git://
proxy specification picked up from the correct place.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28 23:13:02 -08:00
Jan Andres 3e2f62bebf Fix typo in http-push.c
Typo resulted in accessing past the beginning of a string causing segfaults.

[jc: signoffs?]
2005-11-28 21:56:30 -08:00
Nick Hengeveld 0890098780 Decide whether to build http-push in the Makefile
The decision about whether to build http-push or not belongs in the
Makefile.  This follows Junio's suggestion to determine whether curl
is new enough to support http-push.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-19 20:17:25 -08:00
Nick Hengeveld 7b89996749 http-push memory/fd cleanup
Clean up memory and file descriptor usage

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-19 20:17:25 -08:00
Nick Hengeveld acf59575ca Improve XML parsing in http-push
Improved XML parsing - replace specialized doc parser callbacks with generic
functions that track the parser context and use document-specific callbacks
to process that data.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-19 20:17:25 -08:00
Nick Hengeveld 29508e1efb Isolate shared HTTP request functionality
Move shared HTTP request functionality out of http-fetch and http-push,
and replace the two fwrite_buffer/fwrite_buffer_dynamic functions with
one fwrite_buffer function that does dynamic buffering.  Use slot
callbacks to process responses to fetch object transfer requests and
push transfer requests, and put all of http-push into an #ifdef check
for curl multi support.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-19 20:17:24 -08:00
Peter Hagervall f4f440a039 sparse fixes for http-{fetch,push}.c
Make a bunch of needlessly global functions static, and replace two
K&R-style declarations.

Signed-off-by: Peter Hagervall <hager@cs.umu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-08 21:33:32 -08:00
Johannes Schindelin 92e2eb9c0a Small bugfixes for http-push.c
This patch fixes three things:

- older libexpat does not know about enum XML_Status
- as in my patch for http-fetch, do not rely on a curl result in
	free()d data
- calloc the new_lock structure

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-07 13:29:41 -08:00
Nick Hengeveld 0dd276b871 Make http-push smarter about creating remote dirs
Remember object directories known to exist in the remote repo and don't
bother trying to create them.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-07 13:29:39 -08:00
Paul Collins bee8e79da0 http-push.c: include with angle bracket, not dq.
Do not search the current directory when including expat.h, since it
is not supplied by git.

Signed-off-by: Paul Collins <paul@briny.ondioline.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-06 18:31:46 -08:00
Nick Hengeveld 75187c9deb Refresh the remote lock if it is about to expire
Refresh the remote lock if it is about to expire

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-06 01:14:45 -08:00
Nick Hengeveld 26349b2e5e Improve lock handling
Improve lock handling: parse the server response for the timeout, owner,
and lock token

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-06 01:14:45 -08:00
Nick Hengeveld 0772b9a633 Support remote references with slashes in their names
Support remote references with slashes in their names

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-06 01:14:45 -08:00
Nick Hengeveld c17fb6ee07 Verify remote packs, speed up pending request queue
Verify that remote packs exist before using the pack index, add requests to
the beginning of the queue to locate pending requests faster.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-06 01:14:44 -08:00
Nick Hengeveld 58e60dd203 Add support for pushing to a remote repository using HTTP/DAV
Add support for pushing to a remote repository using HTTP/DAV

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-06 01:14:44 -08:00