Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
fcc265fe
Commit
fcc265fe
authored
Feb 17, 2013
by
Michael Schubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pack.h: improve docs on how to create a packfile
parent
25a0831f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletions
+27
-1
include/git2/pack.h
+27
-1
No files found.
include/git2/pack.h
View file @
fcc265fe
...
...
@@ -13,7 +13,33 @@
/**
* @file git2/pack.h
* @brief Git pack management routines
* @defgroup git_pack Git pack management routines
*
* Packing objects
* ---------------
*
* Creation of packfiles requires two steps:
*
* - First, insert all the objects you want to put into the packfile
* using `git_packbuilder_insert` and `git_packbuilder_insert_tree`.
* It's important to add the objects in recency order ("in the order
* that they are 'reachable' from head").
*
* "ANY order will give you a working pack, ... [but it is] the thing
* that gives packs good locality. It keeps the objects close to the
* head (whether they are old or new, but they are _reachable_ from the
* head) at the head of the pack. So packs actually have absolutely
* _wonderful_ IO patterns." - Linus Torvalds
* git.git/Documentation/technical/pack-heuristics.txt
*
* - Second, use `git_packbuilder_write` or `git_packbuilder_foreach` to
* write the resulting packfile.
*
* libgit2 will take care of the delta ordering and generation.
* `git_packbuilder_set_threads` can be used to adjust the number of
* threads used for the process.
*
* See tests-clar/pack/packbuilder.c for an example.
*
* @ingroup Git
* @{
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment