1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 06:47:52 +01:00
Find a file
Jeff King 6d9617f4f7 delta_base_cache: drop special treatment of blobs
When the delta base cache runs out of allowed memory, it has
to drop entries. It does so by walking an LRU list, dropping
objects until we are under the memory limit. But we actually
walk the list twice: once to drop blobs, and then again to
drop other objects (which are generally trees). This comes
from 18bdec1 (Limit the size of the new delta_base_cache,
2007-03-19).

This performs poorly as the number of entries grows, because
any time dropping blobs does not satisfy the limit, we have
to walk the _entire_ list, trees included, looking for blobs
to drop, before starting to drop any trees.

It's not generally a problem now, as the cache is limited to
only 256 entries. But as we could benefit from increasing
that in a future patch, it's worth looking at how it
performs as the cache size grows. And the answer is "not
well".

The table below shows times for various operations with
different values of MAX_DELTA_CACHE (which is not a run-time
knob; I recompiled with -DMAX_DELTA_CACHE=$n for each).

I chose "git log --raw" ("log-raw" in the table) because it
will access all of the trees, but no blobs at all (so in a
sense it is a worst case for this problem, because we will
always walk over the entire list of trees once before
realizing there are no blobs to drop). This is also
representative of other tree-only operations like "rev-list
--objects" and "git log -- <path>".

I also timed "git log -Sfoo --raw" ("log-S" in the table).
It similarly accesses all of the trees, but also the blobs
for each commit. It's representative of "git log -p", though
it emphasizes the cost of blob access more, as "-S" is
cheaper than computing an actual blob diff.

All timings are best-of-3 wall-clock times (though they all
were CPU bound, so the user CPU times are similar). The
repositories were fully packed with --depth=50, and the
default core.deltaBaseCacheLimit of 96M was in effect.  The
current value of MAX_DELTA_CACHE is 256, so I started there
and worked up by factors of 2.

First, here are values for git.git (the asterisk signals the
fastest run for each operation):

    MAX_DELTA_CACHE    log-raw       log-S
    ---------------   ---------    ---------
                256   0m02.212s    0m12.634s
                512   0m02.136s*   0m10.614s
               1024   0m02.156s    0m08.614s
               2048   0m02.208s    0m07.062s
               4096   0m02.190s    0m06.484s*
               8192   0m02.176s    0m07.635s
              16384   0m02.913s    0m19.845s
              32768   0m03.617s    1m05.507s
              65536   0m04.031s    1m18.488s

You can see that for the tree-only log-raw case, we don't
actually benefit that much as the cache grows (all the
differences up through 8192 are basically just noise; this
is probably because we don't actually have that many
distinct trees in git.git). But for log-S, we get a definite
speed improvement as the cache grows, but the improvements
are lost as cache size grows and the linear LRU management
starts to dominate.

Here's the same thing run against linux.git:

    MAX_DELTA_CACHE    log-raw       log-S
    ---------------   ---------    ----------
                256   0m40.987s     5m13.216s
                512   0m37.949s     5m03.243s
               1024   0m35.977s     4m50.580s
               2048   0m33.855s     4m39.818s
               4096   0m32.913s     4m47.299s*
               8192   0m32.176s*    5m14.650s
              16384   0m32.185s     6m31.625s
              32768   0m38.056s     9m31.136s
              65536   1m30.518s    17m38.549s

The pattern is similar, though the effect in log-raw is more
pronounced here. The times dip down in the middle, and then
go back up as we keep growing.

So we know there's a problem. What's the solution?

The obvious one is to improve the data structure to avoid
walking over tree entries during the looking-for-blobs
traversal. We can do this by keeping _two_ LRU lists: one
for blobs, and one for other objects. We drop items from the
blob LRU first, and then from the tree LRU (if necessary).

Here's git.git using that strategy:

    MAX_DELTA_CACHE    log-raw      log-S
    ---------------   ---------   ----------
                256   0m02.264s   0m12.830s
                512   0m02.201s   0m10.771s
               1024   0m02.181s   0m08.593s
               2048   0m02.205s   0m07.116s
               4096   0m02.158s   0m06.537s*
               8192   0m02.213s   0m07.246s
              16384   0m02.155s*  0m10.975s
              32768   0m02.159s   0m16.047s
              65536   0m02.181s   0m16.992s

The upswing on log-raw is gone completely. But log-S still
has it (albeit much better than without this strategy).
Let's see what linux.git shows:

    MAX_DELTA_CACHE    log-raw       log-S
    ---------------   ---------    ---------
                256   0m42.519s    5m14.654s
                512   0m39.106s    5m04.708s
               1024   0m36.802s    4m51.454s
               2048   0m34.685s    4m39.378s*
               4096   0m33.663s    4m44.047s
               8192   0m33.157s    4m50.644s
              16384   0m33.090s*   4m49.648s
              32768   0m33.458s    4m53.371s
              65536   0m33.563s    5m04.580s

The results are similar. The tree-only case again performs
well (not surprising; we're literally just dropping the one
useless walk, and not otherwise changing the cache eviction
strategy at all). But the log-S case again does a bit worse
as the cache grows (though possibly that's within the noise,
which is much larger for this case).

Perhaps this is an indication that the "remove blobs first"
strategy is not actually optimal. The intent of it is to
avoid blowing out the tree cache when we see large blobs,
but it also means we'll throw away useful, recent blobs in
favor of older trees.

Let's run the same numbers without caring about object type
at all (i.e., one LRU list, and always evicting whatever is
at the head, regardless of type).

Here's git.git:

    MAX_DELTA_CACHE    log-raw      log-S
    ---------------   ---------   ---------
                256   0m02.227s   0m12.821s
                512   0m02.143s   0m10.602s
               1024   0m02.127s   0m08.642s
               2048   0m02.148s   0m07.123s
               4096   0m02.194s   0m06.448s*
               8192   0m02.239s   0m06.504s
              16384   0m02.144s*  0m06.502s
              32768   0m02.202s   0m06.622s
              65536   0m02.230s   0m06.677s

Much smoother; there's no dramatic upswing as we increase
the cache size (some remains, though it's small enough that
it's mostly run-to-run noise. E.g., in the log-raw case,
note how 8192 is 50-100ms higher than its neighbors). Note
also that we stop getting any real benefit for log-S after
about 4096 entries; that number will depend on the size of
the repository, the size of the blob entries, and the memory
limit of the cache.

Let's see what linux.git shows for the same strategy:

    MAX_DELTA_CACHE    log-raw      log-S
    ---------------   ---------   ---------
                256   0m41.661s   5m12.410s
                512   0m39.547s   5m07.920s
               1024   0m37.054s   4m54.666s
               2048   0m35.871s   4m41.194s*
               4096   0m34.646s   4m51.648s
               8192   0m33.881s   4m55.342s
              16384   0m35.190s   5m00.122s
              32768   0m35.060s   4m58.851s
              65536   0m33.311s*  4m51.420s

It's similarly good. As with the "separate blob LRU"
strategy, there's a lot of noise on the log-S run here. But
it's certainly not any worse, is possibly a bit better, and
the improvement over "separate blob LRU" on the git.git case
is dramatic.

So it seems like a clear winner, and that's what this patch
implements.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-23 14:57:44 -07:00
block-sha1
builtin Merge branch 'sb/checkout-explit-detach-no-advice' 2016-08-19 15:34:15 -07:00
ci travis-ci: build documentation 2016-05-10 11:19:07 -07:00
compat Merge branch 'js/nedmalloc-gcc6-warnings' into maint 2016-08-10 11:55:31 -07:00
contrib git-multimail: update to release 1.4.0 2016-08-17 11:36:08 -07:00
Documentation Git 2.10-rc1 2016-08-19 15:39:33 -07:00
ewah ewah: convert to REALLOC_ARRAY, etc 2016-02-22 14:51:09 -08:00
git-gui git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution 2015-12-27 15:33:13 -08:00
gitk-git Merge branch 'master' of git://ozlabs.org/~paulus/gitk 2016-03-20 18:05:10 -07:00
gitweb gitweb: escape link body in format_ref_marker 2016-08-01 12:55:40 -07:00
mergetools mergetools: add support for ExamDiff 2016-04-04 09:15:14 -07:00
perl git-svn: warn instead of dying when commit data is missing 2016-07-09 22:53:54 +00:00
po Merge branch 'va/i18n-even-more' 2016-07-13 11:24:10 -07:00
ppc
refs Merge branch 'mh/ref-iterators' 2016-07-25 14:13:33 -07:00
t Merge branch 'ab/hooks' 2016-08-19 15:34:16 -07:00
templates push options: {pre,post}-receive hook learns about push options 2016-07-14 15:50:17 -07:00
vcs-svn vcs-svn: use error_errno() 2016-05-09 12:29:08 -07:00
xdiff Merge branch 'js/ignore-space-at-eol' into maint 2016-08-08 14:21:35 -07:00
.gitattributes .gitattributes: set file type for C files 2016-07-07 14:11:15 -07:00
.gitignore test helpers: move test-* to t/helper/ subdirectory 2016-04-15 10:12:19 -07:00
.mailmap .mailmap: use Christian Couder's Tuxfamily address 2016-08-08 15:17:24 -07:00
.travis.yml Merge branch 'ls/travis-enable-httpd-tests' into maint 2016-08-10 11:55:23 -07: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
alias.c convert trivial cases to ALLOC_ARRAY 2016-02-22 14:51:09 -08:00
alloc.c
archive-tar.c Merge branch 'jk/big-and-future-archive-tar' 2016-08-12 09:47:37 -07:00
archive-zip.c
archive.c i18n: archive: mark errors for translation 2016-08-09 12:44:59 -07:00
archive.h
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 Merge branch 'ss/exc-flag-is-a-collection-of-bits' into maint 2016-04-14 18:37:15 -07:00
attr.h
base85.c
bisect.c Merge branch 'jk/printf-format' 2016-07-19 13:22:22 -07:00
bisect.h
blob.c
blob.h
branch.c worktree.c: check whether branch is rebased in another worktree 2016-04-22 14:09:38 -07:00
branch.h worktree.c: check whether branch is rebased in another worktree 2016-04-22 14:09:38 -07:00
builtin.h
bulk-checkin.c
bulk-checkin.h
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-tree: do not generate empty trees as a result of all i-t-a subentries 2016-07-18 13:45:33 -07:00
cache-tree.h
cache.h Merge branch 'jk/trace-fixup' 2016-08-12 09:47:36 -07:00
check-builtins.sh
check-racy.c check-racy.c: use error_errno() 2016-05-09 12:29:08 -07:00
check_bindir
color.c Merge branch 'jk/ansi-color' 2016-07-11 10:31:05 -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 Merge branch 'bc/cocci' 2016-07-19 13:22:16 -07:00
command-list.txt
commit-slab.h Merge branch 'vs/typofix' 2016-08-12 09:47:37 -07:00
commit.c Merge branch 'rs/pull-signed-tag' 2016-08-19 15:34:14 -07:00
commit.h Merge branch 'rs/pull-signed-tag' 2016-08-19 15:34:14 -07:00
common-main.c mingw: declare main()'s argv as const 2016-07-06 08:11:47 -07:00
config.c i18n: config: unfold error messages marked for translation 2016-07-28 09:11:09 -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 'ew/autoconf-pthread' into maint 2016-08-10 11:55:21 -07:00
connect.c connect: read $GIT_SSH_COMMAND from config file 2016-07-06 14:04:09 -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: add progress flag 2016-07-20 12:11:09 -07:00
connected.h check_connected: add progress flag 2016-07-20 12:11:09 -07:00
convert.c convert: Correct NNO tests and missing LF will be replaced by CRLF 2016-08-14 13:45:52 -07: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
COPYING
credential-cache--daemon.c Merge branch 'jk/common-main-2.8' into jk/common-main 2016-07-06 10:02:57 -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
csum-file.c
csum-file.h
ctype.c
daemon.c Merge branch 'ew/daemon-socket-keepalive' 2016-07-28 10:34:43 -07:00
date.c date: add "unix" format 2016-07-27 14:15:51 -07:00
decorate.c
decorate.h
delta.h
diff-delta.c
diff-lib.c
diff-no-index.c diff-no-index.c: use error_errno() 2016-05-09 12:29:08 -07:00
diff.c Merge branch 'kw/patch-ids-optim' 2016-08-12 09:47:39 -07:00
diff.h patch-ids: add flag to create the diff patch id using header only data 2016-07-29 14:10:01 -07:00
diffcore-break.c diff: rename struct diff_filespec's sha1_valid member 2016-06-28 11:39:02 -07:00
diffcore-delta.c use st_add and st_mult for allocation size computation 2016-02-22 14:51:09 -08:00
diffcore-order.c convert trivial cases to ALLOC_ARRAY 2016-02-22 14:51:09 -08:00
diffcore-pickaxe.c diffcore-pickaxe: support case insensitive match on non-ascii 2016-07-01 12:44:57 -07:00
diffcore-rename.c pass constants as first argument to st_mult() 2016-08-01 14:01:03 -07:00
diffcore.h diff: rename struct diff_filespec's sha1_valid member 2016-06-28 11:39:02 -07: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 Merge branch 'rs/use-strbuf-addbuf' into maint 2016-08-08 14:21:42 -07:00
dir.h Merge branch 'mh/split-under-lock' 2016-07-25 14:13:32 -07:00
editor.c editor.c: use error_errno() 2016-05-09 12:29:08 -07:00
entry.c entry.c: use error_errno() 2016-05-09 12:29:08 -07:00
environment.c Merge branch 'js/windows-dotgit' into maint 2016-05-26 13:17:23 -07:00
exec_cmd.c Merge branch 'ak/extract-argv0-last-dir-sep' into maint 2016-03-10 11:13:47 -08:00
exec_cmd.h prepare_{git,shell}_cmd: use argv_array 2016-02-22 14:51:09 -08:00
fast-import.c Merge branch 'jk/common-main' 2016-07-19 13:22:19 -07:00
fetch-pack.c fetch-pack: grow stateless RPC windows exponentially 2016-07-19 13:27:22 -07:00
fetch-pack.h
fmt-merge-msg.h
fsck.c fsck: optionally show more helpful info for broken links 2016-07-18 15:15:59 -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
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 add--interactive: respect diff.compactionHeuristic 2016-06-16 11:38:58 -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/tighten-alloc' 2016-08-17 14:07:46 -07:00
git-cvsexportcommit.perl
git-cvsimport.perl
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 difftool: use Git::* functions instead of passing around state 2016-07-28 14:01:55 -07: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-merge-octopus.sh i18n: git-sh-setup.sh: mark strings for translation 2016-06-17 15:45:48 -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 Merge branch 'nf/mergetool-prompt' 2016-05-03 14:08:17 -07:00
git-mergetool.sh Merge branch 'nf/mergetool-prompt' into HEAD 2016-05-18 14:40:07 -07:00
git-p4.py Spelling fixes 2016-08-11 14:35:42 -07: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-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-progress-tidy' 2016-08-08 14:48:38 -07: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
git-request-pull.sh
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 Merge branch 'ew/build-time-pager-tweaks' 2016-08-08 14:48:44 -07:00
git-stash.sh i18n: git-stash: mark messages for translation 2016-08-10 10:50:18 -07:00
git-submodule.sh Merge branch 'sb/submodule-update-dot-branch' 2016-08-10 12:33:20 -07:00
git-svn.perl git-svn: allow --version to work anywhere 2016-07-22 20:38:11 +00:00
GIT-VERSION-GEN Git 2.10-rc1 2016-08-19 15:39:33 -07:00
git-web--browse.sh
git.c common-main: call git_setup_gettext() 2016-07-01 15:09:10 -07:00
git.rc
gpg-interface.c Merge branch 'lt/gpg-show-long-key-in-signature-verification-maint' into lt/gpg-show-long-key-in-signature-verification 2016-08-16 15:04:13 -07:00
gpg-interface.h
graph.c Merge branch 'js/log-to-diffopt-file' 2016-07-19 13:22:15 -07:00
graph.h pretty: pass graph width to pretty formatting for use in '%>|(N)' 2016-06-16 11:43:36 -07:00
grep.c Merge branch 'js/am-3-merge-recursive-direct' 2016-08-10 12:33:20 -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
help.c t0006: skip "far in the future" test when unsigned long is not long enough 2016-07-15 09:05:53 -07:00
help.h
hex.c hex: add oid_to_hex_r() 2016-06-28 11:39:02 -07:00
http-backend.c Merge branch 'ew/http-backend-batch-headers' 2016-08-12 09:47:38 -07:00
http-fetch.c common-main: call git_setup_gettext() 2016-07-01 15:09:10 -07:00
http-push.c Merge branch 'rs/use-strbuf-addstr' 2016-08-08 14:48:41 -07:00
http-walker.c http-walker: reduce O(n) ops with doubly-linked list 2016-07-12 15:17:42 -07:00
http.c Merge branch 'rs/use-strbuf-addstr' 2016-08-08 14:48:41 -07:00
http.h Merge branch 'ep/http-curl-trace' 2016-07-06 13:38:06 -07:00
ident.c Merge branch 'jk/reset-ident-time-per-commit' into maint 2016-08-12 09:16:56 -07:00
imap-send.c die("bug"): report bugs consistently 2016-07-26 11:13:44 -07:00
INSTALL
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.h
levenshtein.c convert trivial cases to ALLOC_ARRAY 2016-02-22 14:51:09 -08:00
levenshtein.h
LGPL-2.1
line-log.c Merge branch 'bc/cocci' 2016-07-19 13:22:16 -07:00
line-log.h
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
log-tree.c Merge branch 'nd/log-decorate-color-head-arrow' 2016-08-08 14:48:42 -07:00
log-tree.h
mailinfo.c Merge branch 'rs/mailinfo-lib' 2016-08-17 14:07:47 -07:00
mailinfo.h
mailmap.c Merge branch 'nd/error-errno' 2016-05-17 14:38:28 -07:00
mailmap.h
Makefile Merge branch 'ew/build-time-pager-tweaks' 2016-08-08 14:48:44 -07:00
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 'rs/pull-signed-tag' 2016-08-19 15:34:14 -07: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
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 'rs/notes-merge-no-toctou' 2016-07-28 10:34:41 -07:00
notes-merge.h
notes-utils.c notes: allow treeish expressions as notes ref 2016-01-12 15:10:01 -08:00
notes-utils.h
notes.c use string_list initializer consistently 2016-06-13 10:37:51 -07:00
notes.h Merge branch 'jk/notes-merge-from-anywhere' 2016-02-03 14:15:59 -08:00
object.c
object.h
pack-bitmap-write.c Merge branch 'jk/path-name-safety-2.6' into jk/path-name-safety-2.7 2016-03-16 10:42:32 -07:00
pack-bitmap.c Merge branch 'jk/path-name-safety-2.6' into jk/path-name-safety-2.7 2016-03-16 10:42:32 -07:00
pack-bitmap.h
pack-check.c fsck: use streaming interface for large blobs in pack 2016-07-13 09:15:29 -07:00
pack-objects.c
pack-objects.h
pack-revindex.c Merge branch 'jk/tighten-alloc' 2016-02-26 13:37:16 -08:00
pack-revindex.h pack-revindex: store entries directly in packed_git 2015-12-21 14:36:28 -08:00
pack-write.c sha1_file: drop free_pack_by_name 2016-07-29 11:05:06 -07:00
pack.h fsck: use streaming interface for large blobs in pack 2016-07-13 09:15:29 -07:00
pager.c pager: move pager-specific setup into the build 2016-08-04 13:51:02 -07:00
parse-options-cb.c Merge branch 'jk/parse-options-concat' 2016-08-03 15:10:25 -07:00
parse-options.c parse-options.c: make OPTION_COUNTUP respect "unspecified" values 2016-05-05 11:52:45 -07:00
parse-options.h parse_options: allocate a new array when concatenating 2016-07-06 10:11:08 -07:00
patch-delta.c
patch-ids.c rebase: avoid computing unnecessary patch IDs 2016-08-11 14:39:16 -07:00
patch-ids.h rebase: avoid computing unnecessary patch IDs 2016-08-11 14:39:16 -07:00
path.c Merge branch 'ab/hooks' 2016-08-19 15:34:16 -07:00
pathspec.c pathspec: rename free_pathspec() to clear_pathspec() 2016-06-02 14:09:22 -07:00
pathspec.h pathspec: rename free_pathspec() to clear_pathspec() 2016-06-02 14:09:22 -07:00
pkt-line.c
pkt-line.h
preload-index.c
pretty.c Merge branch 'rs/use-strbuf-add-unique-abbrev' 2016-08-12 09:47:37 -07:00
prio-queue.c
prio-queue.h
progress.c use xmallocz to avoid size arithmetic 2016-02-22 14:51:09 -08:00
progress.h
prompt.c
prompt.h
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
read-cache.c Merge branch 'jc/renormalize-merge-kill-safer-crlf' 2016-07-25 14:13:39 -07:00
README.md README.md: format CLI commands with code syntax 2016-05-31 08:54:24 -07:00
ref-filter.c ref-filter.c: mark strings for translation 2016-02-29 14:27:58 -08:00
ref-filter.h
reflog-walk.c reflog: continue walking the reflog past root commits 2016-06-06 15:06:44 -07:00
reflog-walk.h
refs.c pass constants as first argument to st_mult() 2016-08-01 14:01:03 -07:00
refs.h Merge branch 'mh/ref-iterators' 2016-07-25 14:13:33 -07:00
RelNotes Some fixes for 2.9.3 2016-07-28 11:28:32 -07:00
remote-curl.c Merge branch 'jk/common-main-2.8' into jk/common-main 2016-07-06 10:02:57 -07:00
remote-testsvn.c common-main: call git_extract_argv0_path() 2016-07-01 15:09:10 -07:00
remote.c Merge branch 'jk/push-force-with-lease-creation' 2016-08-10 12:33:18 -07:00
remote.h Merge branch 'jk/push-force-with-lease-creation' 2016-08-10 12:33:18 -07:00
replace_object.c
rerere.c Merge branch 'jc/rerere-multi' 2016-05-23 14:54:38 -07:00
rerere.h Merge branch 'jc/rerere-multi' 2016-04-25 15:17:15 -07:00
resolve-undo.c
resolve-undo.h
revision.c Merge branch 'kw/patch-ids-optim' 2016-08-12 09:47:39 -07:00
revision.h Merge branch 'lt/pretty-expand-tabs' 2016-04-13 14:12:36 -07:00
run-command.c Merge branch 'ab/hooks' 2016-08-19 15:34:16 -07:00
run-command.h run-command: add pipe_command helper 2016-06-17 17:03:56 -07:00
send-pack.c Merge branch 'rs/use-strbuf-addstr' into maint 2016-08-10 11:55:34 -07:00
send-pack.h push: accept push options 2016-07-14 15:50:41 -07:00
sequencer.c Merge branch 'js/am-3-merge-recursive-direct' 2016-08-10 12:33:20 -07:00
sequencer.h
server-info.c server-info.c: use error_errno() 2016-05-09 12:29:08 -07:00
setup.c i18n: setup: mark error messages for translation 2016-08-09 12:44:59 -07:00
sh-i18n--envsubst.c add an extra level of indirection to main() 2016-07-01 15:09:10 -07:00
sha1-array.c
sha1-array.h
sha1-lookup.c
sha1-lookup.h
sha1_file.c delta_base_cache: drop special treatment of blobs 2016-08-23 14:57:44 -07:00
sha1_name.c Merge branch 'bc/object-id' 2016-05-06 14:45:44 -07:00
shallow.c pass constants as first argument to st_mult() 2016-08-01 14:01:03 -07: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 typofix: assorted typofixes in comments, documentation and messages 2016-05-06 13:16:37 -07:00
split-index.h
strbuf.c Merge branch 'rs/use-strbuf-addbuf' into maint 2016-08-08 14:21:42 -07:00
strbuf.h Merge branch 'rs/use-strbuf-addbuf' into maint 2016-08-08 14:21:42 -07:00
streaming.c
streaming.h
string-list.c string_list: use string-list API in unsorted_string_list_lookup() 2016-04-25 11:48:27 -07:00
string-list.h
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 'bc/cocci' 2016-07-19 13:22:16 -07:00
submodule.h Merge branch 'jk/submodule-c-credential' 2016-05-17 14:38:25 -07:00
symlinks.c
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
tempfile.h
thread-utils.c
thread-utils.h
trace.c trace: do not fall back to stderr 2016-08-05 09:28:17 -07:00
trace.h
trailer.c die("bug"): report bugs consistently 2016-07-26 11:13:44 -07:00
trailer.h interpret-trailers: add option for in-place editing 2016-01-14 12:22:17 -08:00
transport-helper.c Spelling fixes 2016-08-11 14:35:42 -07:00
transport.c Merge branch 'rs/use-strbuf-add-unique-abbrev' 2016-08-12 09:47:37 -07:00
transport.h push: accept push options 2016-07-14 15:50:41 -07:00
tree-diff.c Merge branch 'jk/avoid-unbounded-alloca' into maint 2016-07-06 13:06:39 -07:00
tree-walk.c tree-walk: convert tree_entry_extract() to use struct object_id 2016-04-25 14:26:28 -07:00
tree-walk.h tree-walk: convert tree_entry_extract() to use struct object_id 2016-04-25 14:26:28 -07:00
tree.c struct name_entry: use struct object_id instead of unsigned char sha1[20] 2016-04-25 14:23:42 -07:00
tree.h
unicode_width.h
unimplemented.sh unimplemented.sh: use the $( ... ) construct for command substitution 2015-12-27 15:33:13 -08:00
unix-socket.c
unix-socket.h
unpack-trees.c unpack-trees: fix English grammar in do-this-before-that messages 2016-06-27 08:29:36 -07:00
unpack-trees.h
update_unicode.sh
upload-pack.c Spelling fixes 2016-08-11 14:35:42 -07:00
url.c
url.h
urlmatch.c
urlmatch.h
usage.c usage.c: add warning_errno() and error_errno() 2016-05-09 12:29:08 -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.h typofix: assorted typofixes in comments, documentation and messages 2016-05-06 13:16:37 -07:00
varint.c
varint.h
version.c
version.h
versioncmp.c
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 Merge branch 'nd/worktree-lock' 2016-07-28 10:34:42 -07:00
worktree.h worktree.c: add is_worktree_locked() 2016-06-13 11:53:14 -07: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 write_or_die: drop write_or_whine_pipe() 2016-08-05 09:28:17 -07:00
ws.c
wt-status.c Merge branch 'js/am-3-merge-recursive-direct' 2016-08-10 12:33:20 -07:00
wt-status.h wt-status.c: split bisect detection out of wt_status_get_state() 2016-04-22 14:09:39 -07:00
xdiff-interface.c xdiff: don't trim common tail with -W 2016-05-31 13:08:56 -07:00
xdiff-interface.h
zlib.c

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 http://news.gmane.org/gmane.comp.version-control.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