A fork of Git containing Microsoft-specific patches.
Перейти к файлу
Jeff King 7dbabbbebe pack-objects: enforce --depth limit in reused deltas
Since 898b14c (pack-objects: rework check_delta_limit usage,
2007-04-16), we check the delta depth limit only when
figuring out whether we should make a new delta. We don't
consider it at all when reusing deltas, which means that
packing once with --depth=250, and then again with
--depth=50, the second pack may still contain chains larger
than 50.

This is generally considered a feature, as the results of
earlier high-depth repacks are carried forward, used for
serving fetches, etc. However, since we started using
cross-pack deltas in c9af708b1 (pack-objects: use mru list
when iterating over packs, 2016-08-11), we are no longer
bounded by the length of an existing delta chain in a single
pack.

Here's one particular pathological case: a sequence of N
packs, each with 2 objects, the base of which is stored as a
delta in a previous pack. If we chain all the deltas
together, we have a cycle of length N. We break the cycle,
but the tip delta is still at depth N-1.

This is less unlikely than it might sound. See the included
test for a reconstruction based on real-world actions.  I
ran into such a case in the wild, where a client was rapidly
sending packs, and we had accumulated 10,000 before doing a
server-side repack.  The pack that "git repack" tried to
generate had a very deep chain, which caused pack-objects to
run out of stack space in the recursive write_one().

This patch bounds the length of delta chains in the output
pack based on --depth, regardless of whether they are caused
by cross-pack deltas or existed in the input packs. This
fixes the problem, but does have two possible downsides:

  1. High-depth aggressive repacks followed by "normal"
     repacks will throw away the high-depth chains.

     In the long run this is probably OK; investigation
     showed that high-depth repacks aren't actually
     beneficial, and we dropped the aggressive depth default
     to match the normal case in 07e7dbf0d (gc: default
     aggressive depth to 50, 2016-08-11).

  2. If you really do want to store high-depth deltas on
     disk, they may be discarded and new delta computed when
     serving a fetch, unless you set pack.depth to match
     your high-depth size.

The implementation uses the existing search for delta
cycles.  That lets us compute the depth of any node based on
the depth of its base, because we know the base is DFS_DONE
by the time we look at it (modulo any cycles in the graph,
but we know there cannot be any because we break them as we
see them).

There is some subtlety worth mentioning, though. We record
the depth of each object as we compute it. It might seem
like we could save the per-object storage space by just
keeping track of the depth of our traversal (i.e., have
break_delta_chains() report how deep it went). But we may
visit an object through multiple delta paths, and on
subsequent paths we want to know its depth immediately,
without having to walk back down to its final base (doing so
would make our graph walk quadratic rather than linear).

Likewise, one could try to record the depth not from the
base, but from our starting point (i.e., start
recursion_depth at 0, and pass "recursion_depth + 1" to each
invocation of break_delta_chains()). And then when
recursion_depth gets too big, we know that we must cut the
delta chain.  But that technique is wrong if we do not visit
the nodes in topological order. In a chain A->B->C, it
if we visit "C", then "B", then "A", we will never recurse
deeper than 1 link (because we see at each node that we have
already visited it).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-27 16:24:44 -08:00
Documentation Almost ready for 2.11.1 2017-01-17 15:19:11 -08:00
block-sha1 sha1: provide another level of indirection for the SHA-1 functions 2015-11-05 10:35:11 -08:00
builtin pack-objects: enforce --depth limit in reused deltas 2017-01-27 16:24:44 -08:00
ci travis-ci: build documentation 2016-05-10 11:19:07 -07:00
compat Merge branch 'mk/mingw-winansi-ttyname-termination-fix' into maint 2017-01-17 15:19:03 -08:00
contrib Merge branch 'ls/filter-process' into maint 2017-01-17 15:19:08 -08:00
ewah ewah: convert to REALLOC_ARRAY, etc 2016-02-22 14:51:09 -08:00
git-gui git-gui 0.21.0 2016-10-20 09:33:17 -07:00
gitk-git Merge branch 'master' of git://ozlabs.org/~paulus/gitk 2016-03-20 18:05:10 -07:00
gitweb Merge branch 'ab/gitweb-abbrev-links' 2016-10-26 13:14:46 -07:00
mergetools Merge branch 'da/mergetool-xxdiff-hotkey' into maint 2017-01-17 15:11:05 -08:00
perl Merge branch 'mm/send-email-cc-cruft-after-address' into maint 2016-11-29 13:27:55 -08:00
po Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru 2016-11-29 21:19:43 +08:00
ppc sha1: provide another level of indirection for the SHA-1 functions 2015-11-05 10:35:11 -08:00
refs Merge branch 'jk/ref-symlink-loop' 2016-10-17 13:25:20 -07:00
t pack-objects: enforce --depth limit in reused deltas 2017-01-27 16:24:44 -08:00
templates pre-receive.sample: mark it executable 2016-10-28 14:21:11 -07:00
vcs-svn Merge branch 'mr/vcs-svn-printf-ulong' into maint 2016-09-29 16:49:37 -07:00
xdiff Merge branch 'mh/diff-indent-heuristic' 2016-10-03 13:30:38 -07:00
.gitattributes .gitattributes: set file type for C files 2016-07-07 14:11:15 -07:00
.gitignore Merge branch 'bb/unicode-9.0' into maint 2017-01-17 14:49:25 -08:00
.mailmap add David Turner's Two Sigma address 2016-09-26 17:46:44 -07:00
.travis.yml travis-ci: update P4 to 16.2 and GitLFS to 1.5.2 in Linux build 2016-12-05 14:55:52 -08:00
COPYING
GIT-VERSION-GEN Almost ready for 2.11.1 2017-01-17 15:19:11 -08:00
INSTALL git-imap-send: use libcurl for implementation 2014-11-10 09:17:27 -08:00
LGPL-2.1
Makefile Merge branch 'ls/macos-update' into maint 2016-11-29 13:27:56 -08:00
README.md README: replace gmane link with public-inbox 2016-12-15 09:30:09 -08:00
RelNotes Almost ready for 2.11.1 2017-01-17 15:19:11 -08:00
abspath.c Windows: shorten code by re-using convert_slashes() 2016-04-04 18:03:02 -07:00
aclocal.m4
advice.c i18n: advice: internationalize message for conflicts 2016-06-17 15:45:48 -07:00
advice.h pull: check if in unresolved merge state 2015-06-18 13:17:16 -07:00
alias.c convert trivial cases to ALLOC_ARRAY 2016-02-22 14:51:09 -08:00
alloc.c alloc: factor out commit index 2014-07-28 10:14:33 -07:00
apply.c i18n: apply: mark error message for translation 2016-10-17 14:51:42 -07:00
apply.h apply: learn to use a different index file 2016-09-07 12:29:54 -07:00
archive-tar.c Merge branch 'jk/big-and-future-archive-tar' 2016-08-12 09:47:37 -07:00
archive-zip.c Merge branch 'rs/archive-zip-many' into maint 2015-09-03 19:18:01 -07:00
archive.c archive: read local configuration 2016-11-22 13:55:20 -08:00
archive.h archive: read local configuration 2016-11-22 13:55:20 -08:00
argv-array.c argv-array: add detach function 2016-02-22 14:50:32 -08:00
argv-array.h argv-array: add detach function 2016-02-22 14:50:32 -08:00
attr.c read info/{attributes,exclude} only when in repository 2016-10-26 13:30:51 -07:00
attr.h
base85.c
bisect.c use QSORT 2016-09-29 15:42:18 -07:00
bisect.h bisect: simplify the addition of new bisect terms 2015-08-03 11:42:41 -07:00
blob.c add object_as_type helper for casting objects 2014-07-28 10:14:33 -07:00
blob.h
branch.c worktree.c: get_worktrees() takes a new flag argument 2016-11-28 13:18:51 -08:00
branch.h create_branch: drop unused "head" parameter 2016-11-09 14:56:21 -08:00
builtin.h builtin: convert textconv_object to use struct object_id 2016-09-07 12:59:42 -07:00
bulk-checkin.c use xsnprintf for generating git object headers 2015-09-25 10:18:18 -07:00
bulk-checkin.h cleanups: ensure that git-compat-util.h is included first 2014-09-15 12:05:14 -07:00
bundle.c bundle: don't leak an fd in case of early return 2016-04-01 10:33:18 -07:00
bundle.h
cache-tree.c cache: convert struct cache_entry to use struct object_id 2016-09-07 12:59:42 -07:00
cache-tree.h cache-tree: introduce write_index_as_tree() 2015-08-04 22:02:11 -07:00
cache.h Merge branch 'ls/git-open-cloexec' 2016-10-31 13:15:21 -07:00
check-builtins.sh check-builtins: strip executable suffix $X when enumerating builtins 2015-02-05 12:03:27 -08:00
check-racy.c check-racy.c: use error_errno() 2016-05-09 12:29:08 -07:00
check_bindir check_bindir: avoid "test <cond> -a/-o <cond>" 2014-06-09 14:47:06 -07:00
color.c Merge branch 'jk/squelch-false-warning-from-gcc-o3' into maint 2016-09-19 13:51:41 -07:00
color.h Merge branch 'js/color-on-windows-comment' into maint 2016-07-28 11:25:55 -07:00
column.c use xmallocz to avoid size arithmetic 2016-02-22 14:51:09 -08:00
column.h
combine-diff.c diff_aligned_abbrev: use "struct oid" 2016-10-26 13:30:51 -07:00
command-list.txt Merge branch 'nd/multiple-work-trees' 2015-07-13 14:02:02 -07:00
commit-slab.h Merge branch 'vs/typofix' 2016-08-12 09:47:37 -07:00
commit.c Merge branch 'rs/copy-array' into maint 2016-10-11 14:18:32 -07:00
commit.h Merge branch 'nd/shallow-deepen' 2016-10-10 14:03:50 -07:00
common-main.c common-main: stop munging argv[0] path 2016-11-29 11:01:48 -08:00
config.c get_short_sha1: make default disambiguation configurable 2016-09-27 10:29:56 -07:00
config.mak.in
config.mak.uname Merge branch 'ew/build-time-pager-tweaks' 2016-08-08 14:48:44 -07:00
configure.ac Merge branch 'dp/autoconf-curl-ssl' into maint 2016-10-28 09:01:13 -07:00
connect.c Merge branch 'ls/filter-process' 2016-10-31 13:15:21 -07:00
connect.h connect & http: support -4 and -6 switches for remote operations 2016-02-12 11:34:14 -08:00
connected.c check_connected: accept an env argument 2016-10-10 13:54:02 -07:00
connected.h check_connected: accept an env argument 2016-10-10 13:54:02 -07:00
convert.c Merge branch 'jc/renormalize-merge-kill-safer-crlf' into maint 2017-01-17 14:49:28 -08:00
convert.h convert: unify the "auto" handling of CRLF 2016-07-06 11:53:51 -07:00
copy.c copy.c: use error_errno() 2016-05-09 12:29:08 -07:00
credential-cache--daemon.c i18n: credential-cache--daemon: mark advice for translation 2016-10-17 14:51:47 -07:00
credential-cache.c add an extra level of indirection to main() 2016-07-01 15:09:10 -07:00
credential-store.c add an extra level of indirection to main() 2016-07-01 15:09:10 -07:00
credential.c credential: let empty credential specs reset helper list 2016-02-26 10:58:14 -08:00
credential.h credential: let helpers tell us to quit 2014-12-04 10:11:12 -08:00
csum-file.c sha1fd_check: die when we cannot open the file 2015-03-19 13:35:15 -07:00
csum-file.h Merge branch 'jk/pack-bitmap' 2014-12-12 14:31:42 -08:00
ctype.c kwset: use unsigned char to store values with high-bit set 2015-03-02 12:32:24 -08:00
daemon.c Merge branch 'jk/daemon-path-ok-check-truncation' into maint 2016-11-29 13:27:56 -08:00
date.c date: add "unix" format 2016-07-27 14:15:51 -07:00
decorate.c Remove get_object_hash. 2015-11-20 08:02:05 -05:00
decorate.h
delta.h comments: fix misuses of "nor" 2014-03-31 15:29:27 -07:00
diff-delta.c
diff-lib.c commit: fix empty commit creation when there's no changes but ita entries 2016-10-24 10:48:23 -07:00
diff-no-index.c Merge branch 'jk/setup-sequence-update' 2016-09-21 15:15:24 -07:00
diff.c diff: handle --no-abbrev in no-index case 2016-12-08 14:40:30 -08:00
diff.h Merge branch 'nd/ita-empty-commit' 2016-10-27 14:58:50 -07:00
diffcore-break.c Merge branch 'tk/diffcore-delta-remove-unused' into maint 2016-11-29 13:28:03 -08:00
diffcore-delta.c Merge branch 'tk/diffcore-delta-remove-unused' 2016-11-17 13:45:22 -08:00
diffcore-order.c use QSORT 2016-09-29 15:42:18 -07:00
diffcore-pickaxe.c Merge branch 'js/regexec-buf' into maint 2016-09-29 16:49:45 -07:00
diffcore-rename.c Merge branch 'tk/diffcore-delta-remove-unused' into maint 2016-11-29 13:28:03 -08:00
diffcore.h Merge branch 'tk/diffcore-delta-remove-unused' into maint 2016-11-29 13:28:03 -08:00
dir-iterator.c dir_iterator: new API for iterating over a directory tree 2016-06-20 11:38:21 -07:00
dir-iterator.h dir_iterator: new API for iterating over a directory tree 2016-06-20 11:38:21 -07:00
dir.c read info/{attributes,exclude} only when in repository 2016-10-26 13:30:51 -07:00
dir.h ls-files: add pathspec matching for submodules 2016-10-10 12:14:58 -07:00
editor.c editor.c: use error_errno() 2016-05-09 12:29:08 -07:00
entry.c streaming: make stream_blob_to_fd take struct object_id 2016-09-07 12:59:42 -07:00
environment.c Merge branch 'lt/abbrev-auto' 2016-10-27 14:58:47 -07:00
exec_cmd.c common-main: stop munging argv[0] path 2016-11-29 11:01:48 -08:00
exec_cmd.h common-main: stop munging argv[0] path 2016-11-29 11:01:48 -08:00
fast-import.c use QSORT 2016-09-29 15:42:18 -07:00
fetch-pack.c fetch-pack.c: correct command at the beginning of an error message 2016-11-11 13:28:39 -08:00
fetch-pack.h fetch, upload-pack: --deepen=N extends shallow boundary by N commits 2016-06-13 14:38:16 -07:00
fmt-merge-msg.h
fsck.c fsck: handle bad trees like other errors 2016-09-27 14:09:10 -07:00
fsck.h fsck: give the error function a chance to see the fsck_options 2016-07-18 11:35:00 -07:00
generate-cmdlist.sh generate-cmdlist: re-implement as shell script 2015-08-25 11:24:31 -07:00
gettext.c gettext: add is_utf8_locale() 2016-07-01 12:44:57 -07:00
gettext.h gettext: add is_utf8_locale() 2016-07-01 12:44:57 -07:00
git-add--interactive.perl diff: improve positioning of add/delete blocks in diffs 2016-09-19 10:25:11 -07:00
git-archimport.perl
git-bisect.sh i18n: unmark die messages for translation 2016-06-17 15:46:10 -07:00
git-compat-util.h Merge branch 'jk/common-main' into maint-2.10 2016-12-05 11:24:28 -08:00
git-cvsexportcommit.perl
git-cvsimport.perl Merge branch 'cn/cvsimport-perl-update' 2015-06-25 11:08:08 -07:00
git-cvsserver.perl typofix: assorted typofixes in comments, documentation and messages 2016-05-06 13:16:37 -07:00
git-difftool--helper.sh difftool: always honor fatal error exit codes 2016-08-15 15:24:05 -07:00
git-difftool.perl Merge branch 'jk/difftool-in-subdir' into maint 2017-01-17 15:14:40 -08:00
git-filter-branch.sh Merge branch 'jk/filter-branch-no-index' into maint 2016-02-05 14:54:13 -08:00
git-instaweb.sh git-instaweb: use @SHELL_PATH@ instead of /bin/sh 2015-03-10 15:10:35 -07:00
git-merge-octopus.sh git-merge-octopus: do not capitalize "octopus" 2016-09-08 12:17:10 -07:00
git-merge-one-file.sh Merge branch 'jk/no-diff-emit-common' into maint 2016-03-10 11:13:42 -08:00
git-merge-resolve.sh
git-mergetool--lib.sh mergetool: honor mergetool.$tool.trustExitCode for built-in tools 2016-11-29 10:54:03 -08:00
git-mergetool.sh mergetool: honor -O<orderfile> 2016-10-11 10:04:31 -07:00
git-p4.py Merge branch 'gv/p4-multi-path-commit-fix' into maint 2017-01-17 15:19:02 -08:00
git-parse-remote.sh i18n: git-parse-remote.sh: mark strings for translation 2016-04-19 12:07:49 -07:00
git-quiltimport.sh git-quiltimport: add commandline option --series <file> 2015-09-01 11:10:07 -07:00
git-rebase--am.sh rebase: update comment about FreeBSD /bin/sh 2016-06-17 11:04:38 -07:00
git-rebase--interactive.sh Merge branch 'js/rebase-i-commentchar-fix' 2016-11-23 11:23:17 -08:00
git-rebase--merge.sh Merge branch 'em/newer-freebsd-shells-are-fine-with-returns' into maint 2016-07-06 13:06:41 -07:00
git-rebase.sh i18n: git-sh-setup.sh: mark strings for translation 2016-06-17 15:45:48 -07:00
git-relink.perl
git-remote-testgit.sh transport-helper: do not request symbolic refs to remote helpers 2015-01-21 22:46:59 -08:00
git-request-pull.sh Merge branch 'lt/request-pull' 2014-05-19 10:35:36 -07:00
git-send-email.perl Merge branch 'jc/send-email-skip-backup' 2016-07-11 10:31:04 -07:00
git-sh-i18n.sh i18n: rebase-interactive: mark here-doc strings for translation 2016-06-17 15:45:48 -07:00
git-sh-setup.sh git-sh-setup: be explicit where to dot-source git-sh-i18n from. 2016-10-30 16:13:49 -07:00
git-stash.sh Merge branch 'jk/stash-disable-renames-internally' into maint 2017-01-17 14:49:30 -08:00
git-submodule.sh clone: pass --progress decision to recursive submodules 2016-09-22 11:22:47 -07:00
git-svn.perl git-svn: "git worktree" awareness 2016-10-14 01:36:12 +00:00
git-web--browse.sh git-web--browse.sh: use the $( ... ) construct for command substitution 2014-04-23 15:17:02 -07:00
git.c Merge branch 'jk/common-main' into maint-2.10 2016-12-05 11:24:28 -08:00
git.rc Makefile: Fix compilation of Windows resource file 2014-01-23 10:00:28 -08:00
gpg-interface.c gpg-interface: use more status letters 2016-10-12 10:41:59 -07:00
gpg-interface.h verify-commit: add option to print raw gpg status information 2015-06-22 14:20:47 -07:00
graph.c Merge branch 'jk/graph-padding-fix' into maint 2016-10-11 14:19:03 -07:00
graph.h graph: add support for --line-prefix on all graph-aware output 2016-08-31 18:07:09 -07:00
grep.c Merge branch 'js/regexec-buf' into maint 2016-09-29 16:49:45 -07:00
grep.h Merge branch 'jc/grep-commandline-vs-configuration' into maint 2016-08-10 11:55:29 -07:00
hashmap.c convert trivial cases to FLEX_ARRAY macros 2016-02-22 14:51:09 -08:00
hashmap.h hashmap: add string interning API 2014-07-07 13:56:38 -07:00
help.c use QSORT 2016-09-29 15:42:18 -07:00
help.h
hex.c hex: make wraparound of the index into ring-buffer explicit 2016-10-26 10:54:11 -07:00
http-backend.c pkt-line: rename packet_write() to packet_write_fmt() 2016-10-17 11:36:50 -07:00
http-fetch.c common-main: call git_setup_gettext() 2016-07-01 15:09:10 -07:00
http-push.c Merge branch 'jk/common-main' into maint 2016-09-08 21:35:51 -07:00
http-walker.c http-walker: complain about non-404 loose object errors 2016-12-06 12:43:34 -08:00
http.c Merge branch 'jk/http-walker-limit-redirect' into maint 2017-01-17 14:49:29 -08:00
http.h Merge branch 'jk/http-walker-limit-redirect' into maint 2017-01-17 14:49:29 -08:00
ident.c Merge branch 'jk/ident-ai-canonname-could-be-null' into maint 2016-10-03 13:22:32 -07:00
imap-send.c Merge branch 'jc/cocci-xstrdup-or-null' into maint 2016-10-28 09:01:23 -07:00
iterator.h refs: introduce an iterator interface 2016-06-20 11:38:20 -07:00
khash.h convert trivial cases to ALLOC_ARRAY 2016-02-22 14:51:09 -08:00
kwset.c kwset: use unsigned char to store values with high-bit set 2015-03-02 12:32:24 -08:00
kwset.h kwset: use unsigned char to store values with high-bit set 2015-03-02 12:32:24 -08:00
levenshtein.c convert trivial cases to ALLOC_ARRAY 2016-02-22 14:51:09 -08:00
levenshtein.h
line-log.c use QSORT 2016-09-29 15:42:18 -07:00
line-log.h line-log.c: make line_log_data_init() static 2015-01-15 11:05:47 -08:00
line-range.c
line-range.h
list-objects.c struct name_entry: use struct object_id instead of unsigned char sha1[20] 2016-04-25 14:23:42 -07:00
list-objects.h list-objects: pass full pathname to callbacks 2016-03-16 10:41:04 -07:00
list.h list: avoid incompatibility with *BSD sys/queue.h 2016-07-18 11:06:51 -07:00
ll-merge.c Merge branch 'jc/ll-merge-internal' 2016-05-17 14:38:32 -07:00
ll-merge.h
lockfile.c lockfile: improve error message when lockfile exists 2016-03-01 10:16:46 -08:00
lockfile.h mingw: ensure temporary file handles are not inherited by child processes 2016-08-23 09:09:55 -07:00
log-tree.c graph: add support for --line-prefix on all graph-aware output 2016-08-31 18:07:09 -07:00
log-tree.h Merge branch 'jn/parse-config-slot' 2014-10-20 12:23:48 -07:00
mailinfo.c Merge branch 'jt/mailinfo-fold-in-body-headers' into maint 2017-01-17 15:11:06 -08:00
mailinfo.h mailinfo: handle in-body header continuations 2016-09-21 10:23:11 -07:00
mailmap.c cocci: refactor common patterns to use xstrdup_or_null() 2016-10-12 11:22:10 -07:00
mailmap.h
match-trees.c match-trees: convert several leaf functions to use struct object_id 2016-04-25 14:26:29 -07:00
merge-blobs.c Merge branch 'jk/no-diff-emit-common' into maint 2016-03-10 11:13:42 -08:00
merge-blobs.h
merge-recursive.c Merge branch 'nd/qsort-in-merge-recursive' into maint 2017-01-17 15:19:03 -08:00
merge-recursive.h merge-recursive: offer an option to retain the output in 'obuf' 2016-08-01 11:45:30 -07:00
merge.c sequencer: lib'ify checkout_fast_forward() 2016-09-09 11:24:52 -07:00
mergesort.c
mergesort.h
mru.c add generic most-recently-used list 2016-07-29 11:05:07 -07:00
mru.h add generic most-recently-used list 2016-07-29 11:05:07 -07:00
name-hash.c convert trivial cases to FLEX_ARRAY macros 2016-02-22 14:51:09 -08:00
notes-cache.c notes: allow treeish expressions as notes ref 2016-01-12 15:10:01 -08:00
notes-cache.h
notes-merge.c Merge branch 'va/i18n-more' 2016-09-26 16:09:18 -07:00
notes-merge.h notes: extract enum notes_merge_strategy to notes-utils.h 2015-08-17 15:36:23 -07:00
notes-utils.c notes: allow treeish expressions as notes ref 2016-01-12 15:10:01 -08:00
notes-utils.h notes: extract parse_notes_merge_strategy to notes-utils 2015-08-17 15:38:32 -07:00
notes.c notes: convert init_notes to use struct object_id 2016-09-07 12:59:42 -07:00
notes.h Merge branch 'jk/notes-merge-from-anywhere' 2016-02-03 14:15:59 -08:00
object.c Remove get_object_hash. 2015-11-20 08:02:05 -05:00
object.h upload-pack: add get_reachable_list() 2016-06-13 14:38:16 -07:00
pack-bitmap-write.c use QSORT 2016-09-29 15:42:18 -07:00
pack-bitmap.c sha1_file: rename git_open_noatime() to git_open() 2016-10-25 10:59:13 -07:00
pack-bitmap.h pack-bitmap.c: make pack_bitmap_filename() static 2015-01-15 11:04:10 -08:00
pack-check.c Merge branch 'jk/verify-packfile-gently' into maint 2016-10-11 14:21:36 -07:00
pack-objects.c use REALLOC_ARRAY for changing the allocation size of arrays 2014-09-18 09:13:42 -07:00
pack-objects.h pack-objects: enforce --depth limit in reused deltas 2017-01-27 16:24:44 -08:00
pack-revindex.c use COPY_ARRAY 2016-09-25 16:44:13 -07:00
pack-revindex.h pack-revindex: store entries directly in packed_git 2015-12-21 14:36:28 -08:00
pack-write.c use QSORT 2016-09-29 15:42:18 -07:00
pack.h fsck: use streaming interface for large blobs in pack 2016-07-13 09:15:29 -07:00
pager.c Merge branch 'jk/setup-sequence-update' 2016-09-21 15:15:24 -07:00
parse-options-cb.c Merge branch 'rs/cocci' 2016-10-17 13:25:21 -07:00
parse-options.c parse-options: print "fatal:" before usage_msg_opt() 2016-12-14 09:58:09 -08:00
parse-options.h Merge branch 'mh/diff-indent-heuristic' 2016-09-26 16:09:16 -07:00
patch-delta.c
patch-ids.c patch-ids: refuse to compute patch-id for merge commit 2016-09-12 13:45:01 -07:00
patch-ids.h rebase: avoid computing unnecessary patch IDs 2016-08-11 14:39:16 -07:00
path.c Merge branch 'js/normalize-path-copy-ceil' into maint 2017-01-17 15:11:03 -08:00
pathspec.c Merge branch 'ex/deprecate-empty-pathspec-as-match-all' 2016-10-26 13:14:56 -07:00
pathspec.h Merge branch 'bw/pathspec-remove-unused-extern-decl' into maint 2016-09-29 16:49:34 -07:00
pkt-line.c pkt-line: add functions to read/write flush terminated packet streams 2016-10-17 11:36:50 -07:00
pkt-line.h pkt-line: add functions to read/write flush terminated packet streams 2016-10-17 11:36:50 -07:00
preload-index.c cache.h: rename cache_def_free to cache_def_clear 2014-07-13 10:12:37 -07:00
pretty.c Merge branch 'rs/cocci' into maint 2016-10-28 09:01:23 -07:00
prio-queue.c prio-queue: make output stable with respect to insertion 2014-07-15 11:02:54 -07:00
prio-queue.h prio-queue: make output stable with respect to insertion 2014-07-15 11:02:54 -07:00
progress.c use xmallocz to avoid size arithmetic 2016-02-22 14:51:09 -08:00
progress.h
prompt.c prompt.c: remove git_getpass() nobody uses 2015-01-15 11:02:06 -08:00
prompt.h prompt.c: remove git_getpass() nobody uses 2015-01-15 11:02:06 -08:00
quote.c Merge branch 'nd/icase' into maint 2016-07-28 11:26:03 -07:00
quote.h Merge branch 'nd/icase' into maint 2016-07-28 11:26:03 -07:00
reachable.c reachable.c: use error_errno() 2016-05-09 12:29:08 -07:00
reachable.h pack-objects: match prune logic for discarding objects 2014-10-16 10:10:43 -07:00
read-cache.c read-cache: make sure file handles are not inherited by child processes 2016-10-25 11:10:18 -07:00
ref-filter.c Merge branch 'jc/for-each-ref-head-segfault-fix' 2016-11-23 11:23:16 -08:00
ref-filter.h branch.c: use 'ref-filter' APIs 2015-09-25 08:54:54 -07:00
reflog-walk.c reflog: continue walking the reflog past root commits 2016-06-06 15:06:44 -07:00
reflog-walk.h convert "enum date_mode" into a struct 2015-06-29 11:39:07 -07:00
refs.c Merge branch 'jc/cocci-xstrdup-or-null' 2016-10-26 13:14:45 -07:00
refs.h Merge branch 'nd/shallow-deepen' 2016-10-10 14:03:50 -07:00
remote-curl.c Merge branch 'dt/smart-http-detect-server-going-away' into maint 2017-01-17 15:19:03 -08:00
remote-testsvn.c common-main: call git_extract_argv0_path() 2016-07-01 15:09:10 -07:00
remote.c use strbuf_addstr() for adding constant strings to a strbuf, part 2 2016-09-15 12:23:38 -07:00
remote.h Merge branch 'jk/push-force-with-lease-creation' into maint 2016-09-08 21:35:53 -07:00
replace_object.c register_replace_ref(): rewrite to take an object_id argument 2015-05-25 12:19:35 -07:00
rerere.c cache: convert struct cache_entry to use struct object_id 2016-09-07 12:59:42 -07:00
rerere.h Merge branch 'jc/rerere-multi' 2016-04-25 15:17:15 -07:00
resolve-undo.c cache: convert struct cache_entry to use struct object_id 2016-09-07 12:59:42 -07:00
resolve-undo.h
revision.c Merge branch 'vn/revision-shorthand-for-side-branch-log' 2016-10-06 14:53:10 -07:00
revision.h Merge branch 'lt/pretty-expand-tabs' 2016-04-13 14:12:36 -07:00
run-command.c run-command: add clean_on_exit_handler 2016-10-17 11:36:50 -07:00
run-command.h run-command: add clean_on_exit_handler 2016-10-17 11:36:50 -07:00
send-pack.c cocci: refactor common patterns to use xstrdup_or_null() 2016-10-12 11:22:10 -07:00
send-pack.h push: accept push options 2016-07-14 15:50:41 -07:00
sequencer.c Revert "sequencer: remove useless get_dir() function" 2016-12-14 14:56:46 -08:00
sequencer.h sequencer: get rid of the subcommand field 2016-10-21 09:32:34 -07:00
server-info.c use QSORT 2016-09-29 15:42:18 -07:00
setup.c i18n: setup: mark error messages for translation 2016-08-09 12:44:59 -07:00
sh-i18n--envsubst.c remove unnecessary check before QSORT 2016-09-29 15:42:18 -07:00
sha1-array.c Merge branch 'rs/qsort' 2016-10-10 14:03:46 -07:00
sha1-array.h sha1_array: let callbacks interrupt iteration 2016-09-26 11:46:41 -07:00
sha1-lookup.c sha1-lookup: handle duplicates in sha1_pos() 2014-10-01 13:32:19 -07:00
sha1-lookup.h
sha1_file.c Merge branch 'jk/quote-env-path-list-component' into maint 2017-01-17 15:11:06 -08:00
sha1_name.c Merge branch 'jk/no-looking-at-dotgit-outside-repo' 2016-11-01 12:58:49 -07:00
shallow.c Merge branch 'nd/shallow-fixup' into maint 2017-01-17 15:11:05 -08:00
shell.c common-main: call git_setup_gettext() 2016-07-01 15:09:10 -07:00
shortlog.h shortlog: support outputting to streams other than stdout 2016-06-24 14:25:49 -07:00
show-index.c common-main: call git_setup_gettext() 2016-07-01 15:09:10 -07:00
sideband.c Merge branch 'lf/recv-sideband-cleanup' into maint 2016-08-08 14:21:41 -07:00
sideband.h sideband.c: make send_sideband() return void 2016-06-16 11:40:19 -07:00
sigchain.c sigchain: add command to pop all common signals 2015-12-16 12:06:08 -08:00
sigchain.h sigchain: add command to pop all common signals 2015-12-16 12:06:08 -08:00
split-index.c split-index: s/eith/with/ typo fix 2016-11-01 11:48:02 -07:00
split-index.h split-index: the reading part 2014-06-13 11:49:40 -07:00
strbuf.c link_alt_odb_entry: handle normalize_path errors 2016-10-10 13:52:36 -07:00
strbuf.h link_alt_odb_entry: handle normalize_path errors 2016-10-10 13:52:36 -07:00
streaming.c Merge branch 'jk/pack-objects-optim-mru' 2016-10-10 14:03:47 -07:00
streaming.h streaming: make stream_blob_to_fd take struct object_id 2016-09-07 12:59:42 -07:00
string-list.c use QSORT 2016-09-29 15:42:18 -07:00
string-list.h Merge branch 'sb/string-list' 2014-12-22 12:27:30 -08:00
submodule-config.c Merge branch 'sb/submodule-update-dot-branch' 2016-08-10 12:33:20 -07:00
submodule-config.h submodule-config: keep configured branch around 2016-08-01 14:42:07 -07:00
submodule.c Merge branch 'bw/push-dry-run' into maint 2017-01-17 14:49:27 -08:00
submodule.h push: fix --dry-run to not push submodules 2016-11-23 08:39:14 -08:00
symlinks.c symlinks: remove PATH_MAX limitation 2014-07-07 11:22:42 -07:00
tag.c verify-tag: move tag verification code to tag.c 2016-04-22 14:06:46 -07:00
tag.h verify-tag: move tag verification code to tag.c 2016-04-22 14:06:46 -07:00
tar.h
tempfile.c mingw: ensure temporary file handles are not inherited by child processes 2016-08-23 09:09:55 -07:00
tempfile.h mingw: ensure temporary file handles are not inherited by child processes 2016-08-23 09:09:55 -07:00
thread-utils.c thread-utils.c: detect CPU count on older BSD-like systems 2015-03-10 15:13:28 -07:00
thread-utils.h pack-objects: set number of threads before checking and warning 2014-10-13 12:53:46 -07:00
tmp-objdir.c tmp-objdir: quote paths we add to alternates 2016-12-12 15:10:46 -08:00
tmp-objdir.h tmp-objdir: introduce API for temporary object directories 2016-10-10 13:54:02 -07:00
trace.c trace: do not fall back to stderr 2016-08-05 09:28:17 -07:00
trace.h pkt-line: support tracing verbatim pack contents 2015-06-16 13:24:22 -07:00
trailer.c Merge branch 'jt/trailer-with-cruft' 2016-10-31 13:15:22 -07:00
trailer.h interpret-trailers: add option for in-place editing 2016-01-14 12:22:17 -08:00
transport-helper.c Merge branch 'nd/shallow-deepen' 2016-10-10 14:03:50 -07:00
transport.c Merge branch 'bw/push-dry-run' into maint 2017-01-17 14:49:27 -08:00
transport.h Merge branch 'jc/abbrev-auto' 2016-10-27 14:58:48 -07:00
tree-diff.c Merge branch 'jk/avoid-unbounded-alloca' into maint 2016-07-06 13:06:39 -07:00
tree-walk.c fsck: handle bad trees like other errors 2016-09-27 14:09:10 -07:00
tree-walk.h fsck: handle bad trees like other errors 2016-09-27 14:09:10 -07:00
tree.c use QSORT 2016-09-29 15:42:18 -07:00
tree.h Merge branch 'jk/squelch-missing-link-warning-for-unreachable' into maint 2015-06-25 11:02:10 -07:00
unicode_width.h unicode_width.h: update the width tables to Unicode 9.0 2016-12-14 09:48:07 -08:00
unimplemented.sh unimplemented.sh: use the $( ... ) construct for command substitution 2015-12-27 15:33:13 -08:00
unix-socket.c Merge branch 'rs/strbuf-getcwd' 2014-09-02 13:28:44 -07:00
unix-socket.h
unpack-trees.c Merge branch 'sb/unpack-trees-grammofix' into maint 2017-01-17 15:19:05 -08:00
unpack-trees.h
upload-pack.c upload-pack: optionally allow fetching any sha1 2016-11-18 13:06:14 -08:00
url.c introduce hex2chr() for converting two hexadecimal digits to a character 2016-09-07 10:42:46 -07:00
url.h
urlmatch.c urlmatch.c: make match_urls() static 2015-01-15 11:05:48 -08:00
urlmatch.h urlmatch.c: make match_urls() static 2015-01-15 11:05:48 -08:00
usage.c Merge branch 'cc/apply-am' 2016-09-19 13:47:18 -07:00
userdiff.c userdiff: add built-in pattern for CSS 2016-06-03 14:45:56 -07:00
userdiff.h diff: clarify textconv interface 2016-02-22 10:40:35 -08:00
utf8.c utf8: add function to align a string into given strbuf 2015-09-17 10:02:48 -07:00
utf8.h typofix: assorted typofixes in comments, documentation and messages 2016-05-06 13:16:37 -07:00
varint.c cleanups: ensure that git-compat-util.h is included first 2014-09-15 12:05:14 -07:00
varint.h cleanups: ensure that git-compat-util.h is included first 2014-09-15 12:05:14 -07:00
version.c
version.h
versioncmp.c versionsort: support reorder prerelease suffixes 2015-02-27 13:38:22 -08:00
walker.c walker: let walker_say take arbitrary formats 2016-07-08 10:11:23 -07:00
walker.h walker: let walker_say take arbitrary formats 2016-07-08 10:11:23 -07:00
wildmatch.c typofix: assorted typofixes in comments, documentation and messages 2016-05-06 13:16:37 -07:00
wildmatch.h
worktree.c worktree list: keep the list sorted 2016-11-28 13:18:51 -08:00
worktree.h worktree list: keep the list sorted 2016-11-28 13:18:51 -08:00
wrap-for-bin.sh wrap-for-bin.sh: regenerate bin-wrappers when switching branches 2016-05-10 13:23:34 -07:00
wrapper.c Merge branch 'sb/submodule-parallel-fetch' into maint 2016-07-28 11:26:02 -07:00
write_or_die.c run-command: move check_pipe() from write_or_die to run_command 2016-10-17 11:36:49 -07:00
ws.c use strchrnul() in place of strchr() and strlen() 2014-03-10 08:35:30 -07:00
wt-status.c Merge branch 'nd/ita-empty-commit' 2016-10-27 14:58:50 -07:00
wt-status.h wt-status: teach has_{unstaged,uncommitted}_changes() about submodules 2016-10-07 09:29:31 -07:00
xdiff-interface.c Merge branch 'js/regexec-buf' into maint 2016-09-29 16:49:45 -07:00
xdiff-interface.h Convert read_mmblob to take struct object_id. 2016-09-07 12:59:42 -07:00
zlib.c zlib: initialize git_zstream in git_deflate_init{,_gzip,_raw} 2015-03-05 15:46:03 -08:00

README.md

Git - fast, scalable, distributed revision control system

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.

Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers around the net.

Please read the file INSTALL for installation instructions.

Many Git online resources are accessible from http://git-scm.com/ including full documentation and Git related tools.

See Documentation/gittutorial.txt to get started, then see Documentation/giteveryday.txt for a useful minimum set of commands, and Documentation/git-.txt for documentation of each command. If git has been correctly installed, then the tutorial can also be read with man gittutorial or git help tutorial, and the documentation of each command with man git-<commandname> or git help <commandname>.

CVS users may also want to read Documentation/gitcvs-migration.txt (man gitcvs-migration or git help cvs-migration if git is installed).

The user discussion and development of Git take place on the Git mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to git@vger.kernel.org (read Documentation/SubmittingPatches for instructions on patch submission). To subscribe to the list, send an email with just "subscribe git" in the body to majordomo@vger.kernel.org. The mailing list archives are available at https://public-inbox.org/git, http://marc.info/?l=git and other archival sites.

The maintainer frequently sends the "What's cooking" reports that list the current status of various development topics to the mailing list. The discussion following them give a good reference for project status, development direction and remaining tasks.

The name "git" was given by Linus Torvalds when he wrote the very first version. He described the tool as "the stupid content tracker" and the name as (depending on your mood):

  • random three-letter combination that is pronounceable, and not actually used by any common UNIX command. The fact that it is a mispronunciation of "get" may or may not be relevant.
  • stupid. contemptible and despicable. simple. Take your pick from the dictionary of slang.
  • "global information tracker": you're in a good mood, and it actually works for you. Angels sing, and a light suddenly fills the room.
  • "goddamn idiotic truckload of sh*t": when it breaks