summaryrefslogtreecommitdiff
path: root/src/pack.h
Commit message (Collapse)AuthorAgeFilesLines
* pack: iterate objects in offset orderDavid Michael Barr2012-09-141-0/+1
| | | | Compute the ordering on demand and persist until the index is freed.
* portability: Improve x86/amd64 compatibilitynulltoken2012-07-241-1/+1
|
* odb: add git_odb_foreach()Carlos Martín Nieto2012-07-031-0/+4
| | | | | Go through each backend and list every objects that exists in them. This allows fsck-like uses.
* Add packfile_unpack_compressed() to the internal headerCarlos Martín Nieto2012-04-131-0/+7
|
* Migrate ODB files to new error handlingRussell Belfer2012-03-121-6/+6
| | | | | | | | | | | | | | This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to the new style of error handling. Also got the unix and win32 versions of map.c. There are some minor changes to other files but no others were completely converted. This also contains an update to filebuf so that a zeroed out filebuf will not think that the fd (== 0) is actually open (and inadvertently call close() on fd 0 if cleaned up). Lastly, this was built and tested on win32 and contains a bunch of fixes for the win32 build which was pretty broken.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* *: correct and codify various file permissionsBrodie Rao2011-10-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following files now have 0444 permissions: - loose objects - pack indexes - pack files - packs downloaded by fetch - packs downloaded by the HTTP transport And the following files now have 0666 permissions: - config files - repository indexes - reflogs - refs This brings libgit2 more in line with Git. Note that git_filebuf_commit() and git_filebuf_commit_at() have both gained a new mode parameter. The latter change fixes an important issue where filebufs created with GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3) usage). Now we chmod() the file before renaming it into place. Tests have been added to confirm that new commit, tag, and tree objects are created with the right permissions. I don't have access to Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
* Tabify everythingVicent Marti2011-09-191-1/+1
| | | | | | There were quite a few places were spaces were being used instead of tabs. Try to catch them all. This should hopefully not break anything. Except for `git blame`. Oh well.
* Cleanup legal dataVicent Marti2011-09-191-21/+3
| | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* Implement cooperative cachingCarlos Martín Nieto2011-08-181-1/+2
| | | | | | | | | 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>
* Modify the given offset in git_packfile_unpackCarlos Martín Nieto2011-08-021-1/+1
| | | | | | | | The callers immediately throw away the offset, so we don't need any logical changes in any of them. This will be useful for the indexer, as it does need to know where the compressed data ends. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Move pack functions to their own fileCarlos Martín Nieto2011-08-021-19/+15
|
* Make packfile_unpack_header more genericCarlos Martín Nieto2011-08-021-2/+26
| | | | | | On the way, store the fd and the size in the mwindow file. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Move the pack structs to an internal headerCarlos Martín Nieto2011-08-021-0/+94