/usr/share/doc/git/technical
NameSizeModeActions
api-error-handling.html222590644editdlrm
api-error-handling.txt38180644editdlrm
api-index-skel.txt4320644editdlrm
api-index.html171830644editdlrm
api-index.sh6110644editdlrm
api-index.txt6480644editdlrm
api-merge.html183050644editdlrm
api-merge.txt10900644editdlrm
api-parse-options.html366570644editdlrm
api-parse-options.txt131570644editdlrm
api-simple-ipc.html223880644editdlrm
api-simple-ipc.txt48520644editdlrm
api-trace2.html776190644editdlrm
api-trace2.txt442550644editdlrm
bitmap-format.html304030644editdlrm
bitmap-format.txt88710644editdlrm
bundle-uri.html513870644editdlrm
bundle-uri.txt267870644editdlrm
commit-graph.txt179570644editdlrm
directory-rename-detection.txt51990644editdlrm
hash-function-transition.html645390644editdlrm
hash-function-transition.txt358940644editdlrm
long-running-process-protocol.html189950644editdlrm
long-running-process-protocol.txt19290644editdlrm
multi-pack-index.html224620644editdlrm
multi-pack-index.txt44590644editdlrm
pack-heuristics.html435940644editdlrm
pack-heuristics.txt180400644editdlrm
packfile-uri.txt37480644editdlrm
parallel-checkout.html317150644editdlrm
parallel-checkout.txt123010644editdlrm
partial-clone.html364960644editdlrm
partial-clone.txt149680644editdlrm
racy-git.html279950644editdlrm
racy-git.txt91210644editdlrm
reftable.html737920644editdlrm
reftable.txt375250644editdlrm
remembering-renames.txt303600644editdlrm
repository-version.txt43110644editdlrm
rerere.txt65100644editdlrm
scalar.html204580644editdlrm
scalar.txt29350644editdlrm
send-pack-pipeline.html193150644editdlrm
send-pack-pipeline.txt19690644editdlrm
shallow.html196850644editdlrm
shallow.txt25480644editdlrm
sparse-checkout.txt474990644editdlrm
sparse-index.txt95010644editdlrm
trivial-merge.html222730644editdlrm
trivial-merge.txt42640644editdlrm
Edit: /usr/share/doc/git/technical/shallow.txt (2548B)
Shallow commits =============== .Definition ********************************************************* Shallow commits do have parents, but not in the shallow repo, and therefore grafts are introduced pretending that these commits have no parents. ********************************************************* $GIT_DIR/shallow lists commit object names and tells Git to pretend as if they are root commits (e.g. "git log" traversal stops after showing them; "git fsck" does not complain saying the commits listed on their "parent" lines do not exist). Each line contains exactly one object name. When read, a commit_graft will be constructed, which has nr_parent < 0 to make it easier to discern from user provided grafts. Note that the shallow feature could not be changed easily to use replace refs: a commit containing a `mergetag` is not allowed to be replaced, not even by a root commit. Such a commit can be made shallow, though. Also, having a `shallow` file explicitly listing all the commits made shallow makes it a *lot* easier to do shallow-specific things such as to deepen the history. Since fsck-objects relies on the library to read the objects, it honours shallow commits automatically. There are some unfinished ends of the whole shallow business: - maybe we have to force non-thin packs when fetching into a shallow repo (ATM they are forced non-thin). - A special handling of a shallow upstream is needed. At some stage, upload-pack has to check if it sends a shallow commit, and it should send that information early (or fail, if the client does not support shallow repositories). There is no support at all for this in this patch series. - Instead of locking $GIT_DIR/shallow at the start, just the timestamp of it is noted, and when it comes to writing it, a check is performed if the mtime is still the same, dying if it is not. - It is unclear how "push into/from a shallow repo" should behave. - If you deepen a history, you'd want to get the tags of the newly stored (but older!) commits. This does not work right now. To make a shallow clone, you can call "git-clone --depth 20 repo". The result contains only commit chains with a length of at most 20. It also writes an appropriate $GIT_DIR/shallow. You can deepen a shallow repository with "git-fetch --depth 20 repo branch", which will fetch branch from repo, but stop at depth 20, updating $GIT_DIR/shallow. The special depth 2147483647 (or 0x7fffffff, the largest positive number a signed 32-bit integer can contain) means infinite depth.