Commit Graph

84 Commits

Author SHA1 Message Date
Linquize
3343b5ffd3 Fix warning on win64 2013-11-01 17:36:04 +01:00
Vicent Martí
ac5e507cec Merge pull request #1918 from libgit2/cmn/indexer-naming
indexer: remove the stream infix
2013-11-01 09:31:52 -07:00
Carlos Martín Nieto
a6154f2183 indexer: remove the stream infix
It was there to keep it apart from the one which read in from a file on
disk. This other indexer does not exist anymore, so there is no need for
anything other than git_indexer to refer to it.

While here, rename _add() function to _append() and _finalize() to
_commit(). The former change is cosmetic, while the latter avoids
talking about "finalizing", which OO languages use to mean something
completely different.
2013-10-30 15:00:05 +01:00
Vicent Marti
04e0c2b24d pack-objects: Depth can be negative 2013-10-30 14:00:44 +01:00
Vicent Martí
5c50f22a93 Merge pull request #1891 from libgit2/cmn/fix-thin-packs
Add support for thin packs
2013-10-28 09:25:44 -07:00
Carlos Martín Nieto
0b33fca03e indexer: fix thin packs
When given an ODB from which to read objects, the indexer will attempt
to inject the missing bases at the end of the pack and update the
header and trailer to reflect the new contents.
2013-10-04 15:26:41 +02:00
Carlos Martín Nieto
51e82492ef pack: move the object header function here 2013-10-04 10:18:20 +02:00
Jameson Miller
5b18822545 Support cancellation in push operation
This commit adds cancellation for the push operation. This work consists of:

1) Support cancellation during push operation
    - During object counting phase
    - During network transfer phase
        - Propagate GIT_EUSER error code out to caller
2) Improve cancellation support during fetch
    - Handle cancellation request during network transfer phase
    - Clear error string when cancelled during indexing
3) Fix error handling in git_smart__download_pack

Cancellation during push is still only handled in the pack building and
network transfer stages of push (and not during packbuilding).
2013-10-02 15:12:44 -04:00
Jameson Miller
b176ededb7 Initial Implementation of progress reports during push
This adds the basics of progress reporting during push. While progress
for all aspects of a push operation are not reported with this change,
it lays the foundation to add these later. Push progress reporting
can be improved in the future - and consumers of the API should
just get more accurate information at that point.

The main areas where this is lacking are:

1) packbuilding progress: does not report progress during deltafication,
   as this involves coordinating progress from multiple threads.

2) network progress: reports progress as objects and bytes are going
   to be written to the subtransport (instead of as client gets
   confirmation that they have been received by the server) and leaves
   out some of the bytes that are transfered as part of the push protocol.
   Basically, this reports the pack bytes that are written to the
   subtransport. It does not report the bytes sent on the wire that
   are received by the server. This should be a good estimate of
   progress (and an improvement over no progress).
2013-09-30 13:22:28 -04:00
Rémi Duraffort
050af8bbe0 pack: fix memory leak in error path 2013-07-15 16:29:13 +02:00
Russell Belfer
1a42dd17eb Mutex init can fail
It is obviously quite a serious problem if this happens, but mutex
initialization can fail and we should detect it.  It's a bit like
a memory allocation failure, in that you're probably pretty screwed
if this occurs, but at least we'll catch it.
2013-05-31 14:13:11 -07:00
Michael Schubert
563c19a9ce packbuilder: also write index in git_packbuilder_write
git_packbuilder_write() used to write a packfile to the passed file
path. Instead, ask for a destination directory and create both the
packfile and an index, as most users probably do expect.
2013-05-27 13:41:09 +02:00
Xavier L
0b90366c3b Fixes indentation 2013-04-23 12:27:38 -04:00
Xavier L
f0e37a8b86 Added function to insert commit into pack 2013-04-23 12:22:29 -04:00
Carlos Martín Nieto
0e040c031e indexer: use a hashtable for keeping track of offsets
These offsets are needed for REF_DELTA objects, which encode which
object they use as a base, but not where it lies in the packfile, so
we need a list.

These objects are mostly from older packfiles, before OFS_DELTA was
widely spread. The time spent in indexing these packfiles is greatly
reduced, though remains above what git is able to do.
2013-03-03 23:18:29 +01:00
Philip Kelley
b8b897bbc5 Add git_push_options, to set packbuilder parallelism 2013-02-11 09:35:26 -05:00
Philip Kelley
f4b86126ee A simple perf optimization in pack-objects.c 2013-01-22 08:30:40 -05:00
Edward Thomson
359fc2d241 update copyrights 2013-01-08 17:31:27 -06:00
Justin Spahr-Summers
a35b386458 Always check the result of git_mutex_lock 2012-12-09 02:31:39 -08:00
Philip Kelley
613d5eb939 Push! By schu, phkelley, and congyiwu, et al 2012-11-28 11:42:37 -05:00
Russell Belfer
a8122b5d4a Fix warnings on Win64 build 2012-11-27 13:18:29 -08:00
Russell Belfer
e120123e36 API review / update for tree.h 2012-11-27 13:18:28 -08:00
Ben Straub
2508cc66eb Rename ref and reflog apis for consistency 2012-11-27 13:17:45 -08:00
Vicent Martí
aa1c3b588e Merge pull request #1016 from arrbee/fix-checkout-dir-removal
Update checkout with new strategies & behavior
2012-11-13 14:13:47 -08:00
Edward Thomson
603bee0791 Remove git_hash_ctx_new - callers now _ctx_init() 2012-11-13 10:23:05 -06:00
Edward Thomson
d6fb092409 Win32 CryptoAPI and CNG support for SHA1 2012-11-13 10:23:05 -06:00
Russell Belfer
757b406504 Fix warnings and valgrind issues
This fixes some various warnings that showed up in Travis and
a couple uses of uninitialized memory and one memory leak.
2012-11-09 14:01:44 -08:00
Vicent Martí
942a76983b Merge pull request #1034 from carlosmn/packbuilder-foreach
Let the user grab the packfile as it's being written
2012-11-05 06:54:34 -08:00
Philip Kelley
41fb1ca0ec Reorganize transport architecture (squashed 3) 2012-11-01 09:02:33 -04:00
Carlos Martín Nieto
b4b935d8ab packbuilder: add accessors for the number of total and written objects 2012-11-01 06:21:49 +01:00
Carlos Martín Nieto
3dfed9cb86 packbuilder: add git_packbuilder_foreach
Let the user get each object as a buffer+size pair so they can handle
the packfile content as they need to.
2012-11-01 06:21:49 +01:00
Philip Kelley
b4491b9911 Incremental improvements to pack-objects logic
Incorporate feedback for incr. improvements to pack-objects
2012-10-17 12:07:17 -04:00
Michael Schubert
0cf49e1017 fixup! gsoc-pack-objects WIP
Use khash instead of git.git's hashing algorithm.
2012-10-09 21:50:04 +02:00
Michael Schubert
0a32dca5ec gsoc-pack-objects WIP 2012-10-09 21:28:31 +02:00