summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | posix: Properly handle `snprintf` in all platformsVicent Marti2011-08-1812-35/+30
| |
* | odb: Do not pass around a header when hashingVicent Marti2011-08-183-14/+10
| |
* | Keep sending want lines if the server doesn't anwer a flushCarlos Martín Nieto2011-08-181-0/+23
| | | | | | | | | | | | | | | | | | Some servers take a long time to answer and expect us to keep sending want lines; otherwise they close the connection. Avoid this by waiting for one second for the server to answer. If the timeout runs out, treat is as a NAK and keep sending want lines. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Actually implement object negotiationCarlos Martín Nieto2011-08-184-30/+79
| | | | | | | | | | | | | | | | Only signal that we need a pack if we do need it and don't send a want just because it's the first. If we don't need to download the pack, then we can skip all of the negotiation and just return success. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Implement and bind local_send_wantsCarlos Martín Nieto2011-08-181-3/+12
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Move negotiation to the transportCarlos Martín Nieto2011-08-185-46/+83
| | | | | | | | | | | | | | | | | | There are many ways how a transport might negotiate with the server, so instead of making it fit into the smart protocol model, let the transport do its thing. For now, the git protocol limits itself to send only 160 "have" lines so we don't flood the server. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Update transport lifetime documentationCarlos Martín Nieto2011-08-181-13/+10
| | | | | | | | | | | | | | The original was written before any code was written and had nothing to do with the way things are actually done. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Use time sorting in fetchCarlos Martín Nieto2011-08-181-0/+1
| | | | | | | | | | | | This is what the docs say tha we should use. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Be smarter about selecting wantsCarlos Martín Nieto2011-08-181-28/+2
| | | | | | | | | | | | | | There is no need to inspect what the local repository is like. Only check whether the objects exist locally. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Remove enum git_whnCarlos Martín Nieto2011-08-182-16/+4
| | | | | | | | | | | | Instead, use flags inside the git_remote_head structure. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Assert a filename in indexer creationCarlos Martín Nieto2011-08-181-0/+2
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Don't try to download the packfile too earlyCarlos Martín Nieto2011-08-181-14/+11
| | | | | | | | | | | | | | | | Make sure we only try to download the pack if we find the pack header in the stream, and not if the server takes a bit longer to send us the last NAK. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Add git_remote_update_tipsCarlos Martín Nieto2011-08-181-0/+27
| | | | | | | | | | | | | | This function updates the references in the local reference storage to match the ones in the remote. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Implement cooperative cachingCarlos Martín Nieto2011-08-183-4/+49
| | | | | | | | | | | | | | | | | | When indexing a file with ref deltas, a temporary cache for the offsets has to be built, as we don't have an index file yet. If the user takes the responsiblity for filling the cache, the packing code will look there first when it finds a ref delta. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Rethrow pack entry offset errorCarlos Martín Nieto2011-08-181-1/+1
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Use strcpy+strcat as memcpy was overlappingCarlos Martín Nieto2011-08-181-2/+3
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Use common capabilitiesCarlos Martín Nieto2011-08-184-5/+78
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Only wait for pack if we need itCarlos Martín Nieto2011-08-184-8/+26
| | | | | | | | | | | | | | Provide the git_remote_download function to instruct the library to downlad the packfile and let the user know the temporary location. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Tell the user where the downloaded packfile is storedCarlos Martín Nieto2011-08-184-10/+14
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Don't expose the fetch code to the userCarlos Martín Nieto2011-08-184-9/+29
| | | | | | | | | | | | | | | | Move the generation of the want-list to be done from the negotiate function, and keep the filtered references inside the remote structure. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Bind the configuration and remotes to a repositoryCarlos Martín Nieto2011-08-185-4/+11
| | | | | | | | | | | | | | | | Configurations when taken from a repository and remotes should be identifiable as coming from a particular repository. This allows us to reduce the amount of variables that the user has to keep track of. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Download packCarlos Martín Nieto2011-08-186-40/+165
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Move have sendingCarlos Martín Nieto2011-08-186-76/+129
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Implement sending havesCarlos Martín Nieto2011-08-188-14/+89
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Add a generic send_wantsCarlos Martín Nieto2011-08-187-2/+40
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | negotiationCarlos Martín Nieto2011-08-182-4/+74
| |
* | git_pkt_send_wantsCarlos Martín Nieto2011-08-181-0/+26
| |
* | Add git_fetch_list_want which creates the "want" listCarlos Martín Nieto2011-08-181-0/+123
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | refs.c: remove two lines of dead codeschu2011-08-171-2/+0
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | reflog.c: fix memory leaksschu2011-08-171-8/+21
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | git__strndup: immediately return NULL when ENOMEMschu2011-08-171-2/+4
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | config_file.c: fix memory leaksschu2011-08-171-6/+15
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | tsort.c: fix include of common.hschu2011-08-171-1/+2
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | unix/posix.h: remove redundant includeschu2011-08-171-1/+0
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | Fix the reference character check for UnicodeCarlos Martín Nieto2011-08-161-2/+2
| | | | | | | | | | | | | | We need to do an unsigned comparison, as otherwise UTF-8 characters might look like they have the sign bit set and the check will fail. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | reflog: fix memory leaksschu2011-08-161-1/+5
| | | | | | | | | | | | | | Make sure to free the existing reflog when we run out or memory while adding new entries. Signed-off-by: schu <schu-github@schulog.org>
* | reflog: assimilate reflog API to return git_oid'sschu2011-08-152-11/+10
| | | | | | | | | | | | | | Rather than returning the OIDs out of the reflog as string return them as git_oid. Signed-off-by: schu <schu-github@schulog.org>
* | commit: Add support for Encoding headerVicent Marti2011-08-122-31/+31
| |
* | Merge pull request #355 from jdavid/fix-buildVicent Martí2011-08-091-2/+2
|\ \ | | | | | | Fix "redefinition of typedef git_indexer" build error
| * | Fix "redefinition of typedef git_indexer" build errorJ. David Ibáñez2011-08-051-2/+2
| | | | | | | | | | | | Signed-off-by: J. David Ibáñez <jdavid@itaapy.com>
* | | Merge pull request #361 from nulltoken/ntk/fix/wrap-strcmpVicent Martí2011-08-094-13/+19
|\ \ \ | | | | | | | | util: Add git__strcmp_cb() wrapper
| * | | util: Add git__strcmp_cb() wrappernulltoken2011-08-094-13/+19
| | | | | | | | | | | | | | | | We don't want direct pointers to the CRT on Windows, we may get stdcall conflicts.
* | | | mwindow.c: fix -Wmissing-field-initializersschu2011-08-091-1/+6
|/ / / | | | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | | Fix compilation in WindowsVicent Marti2011-08-085-25/+25
| | |
* | | transport: Wrap `strcmp`Vicent Marti2011-08-081-1/+8
| | | | | | | | | | | | | | | We don't want direct pointers to the CRT on Windows, we may get stdcall conflicts.
* | | Use the internal sort in the local transportCarlos Martín Nieto2011-08-061-9/+1
|/ / | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Check for error calculating the delta baseCarlos Martín Nieto2011-08-041-0/+2
| | | | | | | | | | | | Don't assume that it's always going to work. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Merge pull request #345 from carlosmn/gsoc2011/indexerVicent Martí2011-08-037-1108/+1655
|\ \ | | | | | | Implement a pack indexer
| * | Move pack index writing to a public functionCarlos Martín Nieto2011-08-031-7/+1
| | | | | | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * | Implement the indexerCarlos Martín Nieto2011-08-031-42/+209
| | | | | | | | | | | | | | | | | | Only v2 index files are supported. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>