Find a file
SZEDER Gábor 3cb9d2b6f9 line-log: more responsive, incremental 'git log -L'
The current line-level log implementation performs a preprocessing
step in prepare_revision_walk(), during which the line_log_filter()
function filters and rewrites history to keep only commits modifying
the given line range.  This preprocessing affects both responsiveness
and correctness:

  - Git doesn't produce any output during this preprocessing step.
    Checking whether a commit modified the given line range is
    somewhat expensive, so depending on the size of the given revision
    range this preprocessing can result in a significant delay before
    the first commit is shown.

  - Limiting the number of displayed commits (e.g. 'git log -3 -L...')
    doesn't limit the amount of work during preprocessing, because
    that limit is applied during history traversal.  Alas, by that
    point this expensive preprocessing step has already churned
    through the whole revision range to find all commits modifying the
    revision range, even though only a few of them need to be shown.

  - It rewrites parents, with no way to turn it off.  Without the user
    explicitly requesting parent rewriting any parent object ID shown
    should be that of the immediate parent, just like in case of a
    pathspec-limited history traversal without parent rewriting.

    However, after that preprocessing step rewrote history, the
    subsequent "regular" history traversal (i.e. get_revision() in a
    loop) only sees commits modifying the given line range.
    Consequently, it can only show the object ID of the last ancestor
    that modified the given line range (which might happen to be the
    immediate parent, but many-many times it isn't).

This patch addresses both the correctness and, at least for the common
case, the responsiveness issues by integrating line-level log
filtering into the regular revision walking machinery:

  - Make process_ranges_arbitrary_commit(), the static function in
    'line-log.c' deciding whether a commit modifies the given line
    range, public by removing the static keyword and adding the
    'line_log_' prefix, so it can be called from other parts of the
    revision walking machinery.

  - If the user didn't explicitly ask for parent rewriting (which, I
    believe, is the most common case):

    - Call this now-public function during regular history traversal,
      namely from get_commit_action() to ignore any commits not
      modifying the given line range.

      Note that while this check is relatively expensive, it must be
      performed before other, much cheaper conditions, because the
      tracked line range must be adjusted even when the commit will
      end up being ignored by other conditions.

    - Skip the line_log_filter() call, i.e. the expensive
      preprocessing step, in prepare_revision_walk(), because, thanks
      to the above points, the revision walking machinery is now able
      to filter out commits not modifying the given line range while
      traversing history.

      This way the regular history traversal sees the unmodified
      history, and is therefore able to print the object ids of the
      immediate parents of the listed commits.  The eliminated
      preprocessing step can greatly reduce the delay before the first
      commit is shown, see the numbers below.

  - However, if the user did explicitly ask for parent rewriting via
    '--parents' or a similar option, then stick with the current
    implementation for now, i.e. perform that expensive filtering and
    history rewriting in the preprocessing step just like we did
    before, leaving the initial delay as long as it was.

I tried to integrate line-level log filtering with parent rewriting
into the regular history traversal, but, unfortunately, several
subtleties resisted... :)  Maybe someday we'll figure out how to do
that, but until then at least the simple and common (i.e. without
parent rewriting) 'git log -L:func:file' commands can benefit from the
reduced delay.

This change makes the failing 'parent oids without parent rewriting'
test in 't4211-line-log.sh' succeed.

The reduced delay is most noticable when there's a commit modifying
the line range near the tip of a large-ish revision range:

  # no parent rewriting requested, no commit-graph present
  $ time git --no-pager log -L:read_alternate_refs:sha1-file.c -1 v2.23.0

  Before:

    real    0m9.570s
    user    0m9.494s
    sys     0m0.076s

  After:

    real    0m0.718s
    user    0m0.674s
    sys     0m0.044s

A significant part of the remaining delay is spent reading and parsing
commit objects in limit_list().  With the help of the commit-graph we
can eliminate most of that reading and parsing overhead, so here are
the timing results of the same command as above, but this time using
the commit-graph:

  Before:

    real    0m8.874s
    user    0m8.816s
    sys     0m0.057s

  After:

    real    0m0.107s
    user    0m0.091s
    sys     0m0.013s

The next patch will further reduce the remaining delay.

To be clear: this patch doesn't actually optimize the line-level log,
but merely moves most of the work from the preprocessing step to the
history traversal, so the commits modifying the line range can be
shown as soon as they are processed, and the traversal can be
terminated as soon as the given number of commits are shown.
Consequently, listing the full history of a line range, potentially
all the way to the root commit, will take the same time as before (but
at least the user might start reading the output earlier).
Furthermore, if the most recent commit modifying the line range is far
away from the starting revision, then that initial delay will still be
significant.

Additional testing by Derrick Stolee: In the Linux kernel repository,
the MAINTAINERS file was changed ~3,500 times across the ~915,000
commits. In addition to that edit frequency, the file itself is quite
large (~18,700 lines). This means that a significant portion of the
computation is taken up by computing the patch-diff of the file. This
patch improves the real time it takes to output the first result quite
a bit:

Command: git log -L 100,200:MAINTAINERS -n 1 >/dev/null
 Before: 3.88 s
  After: 0.71 s

If we drop the "-n 1" in the command, then there is no change in
end-to-end process time. This is because the command still needs to
walk the entire commit history, which negates the point of this
patch. This is expected.

As a note for future reference, the ~4.3 seconds in the old code
spends ~2.6 seconds computing the patch-diffs, and the rest of the
time is spent walking commits and computing diffs for which paths
changed at each commit. The changed-path Bloom filters could improve
the end-to-end computation time (i.e. no "-n 1" in the command).

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-05-11 09:33:56 -07:00
.github
block-sha1
builtin blame: use changed-path Bloom filters 2020-04-16 15:38:06 -07:00
ci commit-graph: add GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS test flag 2020-04-06 11:08:37 -07:00
compat Merge branch 'js/mingw-open-in-gdb' into maint 2020-03-17 15:02:25 -07:00
contrib completion: offer '--(no-)patch' among 'git log' options 2020-05-11 09:33:56 -07:00
Documentation Documentation: changed-path Bloom filters use byte words 2020-05-11 09:33:56 -07:00
ewah Merge branch 'jk/object-filter-with-bitmap' 2020-03-02 15:07:18 -08:00
git-gui Merge https://github.com/prati0100/git-gui 2020-03-19 16:06:51 -07:00
gitk-git Merge gitk to pick up emergency build fix 2019-09-17 14:59:18 -07:00
gitweb Merge branch 'do/gitweb-typofix-in-comments' 2020-01-08 12:44:11 -08:00
mergetools
negotiator
perl Fix spelling errors in documentation outside of Documentation/ 2019-11-07 13:42:00 +09:00
po l10n: tr.po: change file mode to 644 2020-03-21 18:26:56 +08:00
ppc
refs C: use skip_prefix() to avoid hardcoded string length 2020-01-31 13:03:45 -08:00
sha1collisiondetection@855827c583
sha1dc Merge branch 'jk/lore-is-the-archive' 2019-12-06 15:09:23 -08:00
sha256 hash: implement and use a context cloning function 2020-02-24 09:33:21 -08:00
t line-log: more responsive, incremental 'git log -L' 2020-05-11 09:33:56 -07:00
templates Merge branch 'kw/fsmonitor-watchman-racefix' 2020-02-14 12:54:20 -08:00
trace2 Merge branch 'en/doc-typofix' 2019-12-01 09:04:35 -08:00
vcs-svn
xdiff Merge branch 'rs/xdiff-ignore-ws-w-func-context' 2019-12-16 13:08:32 -08:00
.cirrus.yml CI: add FreeBSD CI support via Cirrus-CI 2019-12-20 12:09:12 -08:00
.clang-format
.editorconfig editorconfig: indent text files with tabs 2020-01-06 08:46:32 -08:00
.gitattributes Fix build with core.autocrlf=true 2019-09-24 19:48:27 +05:30
.gitignore stash: remove the stash.useBuiltin setting 2020-03-05 12:50:28 -08:00
.gitmodules
.mailmap Merge branch 'bc/wildcard-credential' 2020-03-05 10:43:02 -08:00
.travis.yml travis-ci: build with GCC 4.8 as well 2019-07-19 14:06:01 -07:00
.tsan-suppressions replace-object: make replace operations thread-safe 2020-01-17 13:52:14 -08:00
abspath.c real_path_if_valid(): remove unsafe API 2020-03-10 11:41:40 -07:00
aclocal.m4
add-interactive.c Merge branch 'js/builtin-add-i-cmds' into maint 2020-03-17 15:02:20 -07:00
add-interactive.h built-in add -p: respect the interactive.singlekey config setting 2020-01-15 12:06:17 -08:00
add-patch.c built-in add -p: respect the interactive.singlekey config setting 2020-01-15 12:06:17 -08:00
advice.c Merge branch 'hw/advise-ng' 2020-03-25 13:57:41 -07:00
advice.h Merge branch 'hw/advise-ng' 2020-03-25 13:57:41 -07:00
alias.c
alias.h
alloc.c
alloc.h
apply.c convert: permit passing additional metadata to filter processes 2020-03-16 11:37:02 -07:00
apply.h apply.h: include missing header 2019-09-28 14:04:16 +09:00
archive-tar.c streaming: allow open_istream() to handle any repo 2020-01-31 10:45:39 -08:00
archive-zip.c streaming: allow open_istream() to handle any repo 2020-01-31 10:45:39 -08:00
archive.c convert: provide additional metadata to filters 2020-03-16 11:37:02 -07:00
archive.h convert: provide additional metadata to filters 2020-03-16 11:37:02 -07:00
argv-array.c argv-array: add space after while 2019-11-20 13:29:02 +09:00
argv-array.h argv-array: move doc to argv-array.h 2019-11-18 15:21:29 +09:00
attr.c attr: move doc to attr.h 2019-11-18 15:21:28 +09:00
attr.h attr: move doc to attr.h 2019-11-18 15:21:28 +09:00
azure-pipelines.yml Azure Pipeline: switch to the latest agent pools 2020-02-27 09:58:43 -08:00
banned.h banned.h: fix vsprintf()'s ban message 2019-08-26 10:32:45 -07:00
base85.c
bisect.c bisect: libify bisect_next_all 2020-02-19 09:37:15 -08:00
bisect.h bisect: libify bisect_next_all 2020-02-19 09:37:15 -08:00
blame.c blame: drop unused parameter from maybe_changed_path 2020-04-23 14:37:03 -07:00
blame.h blame: use changed-path Bloom filters 2020-04-16 15:38:06 -07:00
blob.c
blob.h
bloom.c bloom: use num_changes not nr for limit detection 2020-05-11 09:33:56 -07:00
bloom.h bloom: fix whitespace around tab length 2020-05-01 11:41:21 -07:00
branch.c
branch.h
builtin.h sparse-checkout: create builtin with 'list' subcommand 2019-11-22 16:11:43 +09:00
bulk-checkin.c bulk-checkin: zero-initialize hashfile_checkpoint 2019-09-06 11:03:39 -07:00
bulk-checkin.h
bundle.c bundle-create: progress output control 2019-11-11 11:46:28 +09:00
bundle.h bundle-create: progress output control 2019-11-11 11:46:28 +09:00
cache-tree.c sha1-file: pass git_hash_algo to hash_object_file() 2020-01-31 10:45:39 -08:00
cache-tree.h cache-tree: share code between functions writing an index as a tree 2019-08-19 10:08:03 -07:00
cache.h Merge branch 'bc/filter-process' 2020-03-26 17:11:20 -07:00
chdir-notify.c
chdir-notify.h
check-builtins.sh
check_bindir
checkout.c
checkout.h
CODE_OF_CONDUCT.md CODE_OF_CONDUCT: mention individual project-leader emails 2019-10-10 10:41:46 +09:00
color.c color.c: alias RGB colors 8-15 to aixterm colors 2020-02-11 11:19:00 -08:00
color.h
column.c column: use utf8_strnwidth() to strip out ANSI color escapes 2019-10-15 10:54:15 +09:00
column.h
combine-diff.c combine-diff: replace GIT_SHA1_HEXSZ with the_hash_algo 2019-08-19 15:04:58 -07:00
command-list.txt Merge branch 'ds/sparse-cone' 2019-12-25 11:21:58 -08:00
commit-graph.c tests: write commit-graph with Bloom filters 2020-04-16 15:38:04 -07:00
commit-graph.h tests: write commit-graph with Bloom filters 2020-04-16 15:38:04 -07:00
commit-reach.c commit-graph: fix writing first commit-graph during fetch 2019-10-25 11:19:16 +09:00
commit-reach.h
commit-slab-decl.h
commit-slab-impl.h
commit-slab.h commit-slab: clarify slabname##_peek()'s return value 2020-03-10 11:44:24 -07:00
commit.c Merge branch 'at/rebase-fork-point-regression-fix' 2020-03-26 17:11:21 -07:00
commit.h gpg-interface: add minTrustLevel as a configuration option 2020-01-15 14:06:06 -08:00
common-main.c common-main: delay trace2 initialization 2019-08-06 13:09:01 -07:00
config.c Merge branch 'bw/remote-rename-update-config' 2020-02-25 11:18:32 -08:00
config.h config: provide access to the current line number 2020-02-10 10:52:10 -08:00
config.mak.dev Merge branch 'bc/sha-256-part-1-of-4' 2020-03-26 17:11:20 -07:00
config.mak.in
config.mak.uname Sync with 2.23.1 2019-12-06 16:31:39 +01:00
configure.ac Merge branch 'dd/sequencer-utf8' 2019-12-01 09:04:36 -08:00
connect.c Sync with 2.23.1 2019-12-06 16:31:39 +01:00
connect.h
connected.c connected.c: reprepare packs for corner cases 2020-03-15 15:39:00 -07:00
connected.h connected: verify promisor-ness of partial clone 2020-01-30 10:55:31 -08:00
convert.c convert: provide additional metadata to filters 2020-03-16 11:37:02 -07:00
convert.h convert: provide additional metadata to filters 2020-03-16 11:37:02 -07:00
copy.c
COPYING
credential-cache--daemon.c
credential-cache.c
credential-store.c
credential.c credential: allow wildcard patterns when matching config 2020-02-20 13:05:43 -08:00
credential.h Merge branch 'bc/wildcard-credential' 2020-03-05 10:43:02 -08:00
csum-file.c hash: implement and use a context cloning function 2020-02-24 09:33:21 -08:00
csum-file.h csum-file: introduce hashfile_total() 2020-01-23 10:51:50 -08:00
ctype.c
daemon.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
date.c date.c: switch to reentrant {gm,local}time_r 2019-11-30 13:50:48 -08:00
decorate.c
decorate.h
delta-islands.c
delta-islands.h
delta.h
detect-compiler
diff-delta.c diff-delta: set size out-parameter to 0 for NULL delta 2019-09-06 11:03:39 -07:00
diff-lib.c
diff-no-index.c
diff.c convert: provide additional metadata to filters 2020-03-16 11:37:02 -07:00
diff.h diff: halt tree-diff early after max_changes 2020-03-30 09:59:53 -07:00
diffcore-break.c diffcore-break: use a goto instead of a redundant if statement 2019-10-02 15:04:21 +09:00
diffcore-delta.c
diffcore-order.c
diffcore-pickaxe.c
diffcore-rename.c sha1-file: pass git_hash_algo to hash_object_file() 2020-01-31 10:45:39 -08:00
diffcore.h diff: move doc to diff.h and diffcore.h 2019-11-18 15:21:28 +09:00
dir-iterator.c
dir-iterator.h
dir.c Merge branch 'ds/sparse-add' 2020-03-05 10:43:02 -08:00
dir.h Merge branch 'ds/sparse-cone' 2019-12-25 11:21:58 -08:00
editor.c real_path: remove unsafe API 2020-03-10 11:41:40 -07:00
entry.c convert: provide additional metadata to filters 2020-03-16 11:37:02 -07:00
environment.c real_path: remove unsafe API 2020-03-10 11:41:40 -07:00
exec-cmd.c
exec-cmd.h
fast-import.c fast-import: add options for rewriting submodules 2020-02-28 09:53:41 -08:00
fetch-negotiator.c repo-settings: create feature.experimental setting 2019-08-13 13:33:55 -07:00
fetch-negotiator.h repo-settings: create feature.experimental setting 2019-08-13 13:33:55 -07:00
fetch-pack.c Merge branch 'ec/fetch-mark-common-refs-trace2' 2019-12-05 12:52:44 -08:00
fetch-pack.h
fmt-merge-msg.h
fsck.c Sync with Git 2.24.1 2019-12-09 22:17:55 -08:00
fsck.h fsck: only provide oid/type in fsck_error callback 2019-10-28 14:05:18 +09:00
fsmonitor.c fsmonitor: handle version 2 of the hooks that will use opaque token 2020-01-13 14:58:43 -08:00
fsmonitor.h
fuzz-commit-graph.c
fuzz-pack-headers.c
fuzz-pack-idx.c
generate-cmdlist.sh
gettext.c Merge branch 'ab/test-env' 2019-07-25 13:59:20 -07:00
gettext.h
git-add--interactive.perl git add -p: use non-zero exit code when the diff generation failed 2019-12-06 08:57:34 -08:00
git-archimport.perl
git-bisect.sh
git-compat-util.h Sync with Git 2.24.1 2019-12-09 22:17:55 -08:00
git-cvsexportcommit.perl
git-cvsimport.perl Fix spelling errors in messages shown to users 2019-11-10 16:00:54 +09:00
git-cvsserver.perl
git-difftool--helper.sh
git-filter-branch.sh Recommend git-filter-repo instead of git-filter-branch 2019-09-05 13:01:48 -07:00
git-instaweb.sh
git-merge-octopus.sh
git-merge-one-file.sh
git-merge-resolve.sh
git-mergetool--lib.sh
git-mergetool.sh
git-p4.py Merge branch 'yz/p4-py3' 2020-03-25 13:57:43 -07:00
git-parse-remote.sh
git-quiltimport.sh
git-rebase--preserve-merges.sh rebase: fold git-rebase--common into the -p backend 2019-07-31 12:24:06 -07:00
git-request-pull.sh
git-send-email.perl Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
git-sh-i18n.sh
git-sh-setup.sh
git-submodule.sh Merge branch 'es/recursive-single-branch-clone' 2020-03-05 10:43:03 -08:00
git-svn.perl git svn: stop using rebase --preserve-merges 2019-11-23 09:49:23 +09:00
GIT-VERSION-GEN The first batch post 2.26 cycle 2020-03-25 13:57:44 -07:00
git-web--browse.sh
git.c stash: remove the stash.useBuiltin setting 2020-03-05 12:50:28 -08:00
git.rc
gpg-interface.c gpg-interface: prefer check_signature() for GPG verification 2020-03-15 09:46:28 -07:00
gpg-interface.h gpg-interface: prefer check_signature() for GPG verification 2020-03-15 09:46:28 -07:00
graph.c graph: fix collapse of multiple edges 2020-01-15 12:14:51 -08:00
graph.h graph: move doc to graph.h and graph.c 2019-11-18 15:21:28 +09:00
grep.c grep: replace grep_read_mutex by internal obj read lock 2020-01-17 13:52:14 -08:00
grep.h grep: replace grep_read_mutex by internal obj read lock 2020-01-17 13:52:14 -08:00
hash.h hash: implement and use a context cloning function 2020-02-24 09:33:21 -08:00
hashmap.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
hashmap.h Merge branch 'en/doc-typofix' 2019-12-01 09:04:35 -08:00
help.c Fix spelling errors in messages shown to users 2019-11-10 16:00:54 +09:00
help.h help: make help_unknown_ref() NORETURN 2019-08-30 10:22:42 -07:00
hex.c hex: add functions to parse hex object IDs in any algorithm 2020-02-24 09:33:21 -08:00
http-backend.c
http-fetch.c
http-push.c http-push: simplify deleting a list item 2019-10-15 10:53:50 +09:00
http-walker.c
http.c Merge branch 'js/https-proxy-config' 2020-03-25 13:57:42 -07:00
http.h http: use xmalloc with cURL 2019-08-15 12:37:10 -07:00
ident.c
imap-send.c
INSTALL Merge branch 'ar/install-doc-update-cmds-needing-the-shell' 2019-12-01 09:04:41 -08:00
interdiff.c
interdiff.h
iterator.h
json-writer.c
json-writer.h
khash.h
kwset.c Merge branch 'rs/copy-array' into maint 2019-07-29 12:38:15 -07:00
kwset.h kset.h, tar.h: add missing header guard to prevent multiple inclusion 2019-11-07 20:12:04 +09:00
levenshtein.c
levenshtein.h
LGPL-2.1
line-log.c line-log: more responsive, incremental 'git log -L' 2020-05-11 09:33:56 -07:00
line-log.h line-log: more responsive, incremental 'git log -L' 2020-05-11 09:33:56 -07:00
line-range.c
line-range.h
linear-assignment.c
linear-assignment.h
list-objects-filter-options.c Merge branch 'jk/partial-clone-sparse-blob' 2019-10-07 11:32:54 +09:00
list-objects-filter-options.h Merge branch 'jk/partial-clone-sparse-blob' 2019-10-07 11:32:54 +09:00
list-objects-filter.c Merge branch 'jk/partial-clone-sparse-blob' 2019-10-07 11:32:54 +09:00
list-objects-filter.h
list-objects.c Merge branch 'jk/list-objects-optim-wo-trees' 2019-10-07 11:32:56 +09:00
list-objects.h
list.h
ll-merge.c am: reload .gitattributes after patching it 2019-09-03 15:16:18 -07:00
ll-merge.h merge: move doc to ll-merge.h 2019-11-18 15:21:28 +09:00
lockfile.c
lockfile.h
log-tree.c Merge branch 'hi/gpg-prefer-check-signature' 2020-03-26 17:11:20 -07:00
log-tree.h
ls-refs.c
ls-refs.h
mailinfo.c Merge branch 'rs/micro-cleanups' 2020-03-02 15:07:20 -08:00
mailinfo.h
mailmap.c
mailmap.h
Makefile bloom.c: add the murmur3 hash implementation 2020-03-30 09:59:53 -07:00
match-trees.c
mem-pool.c
mem-pool.h
merge-blobs.c
merge-blobs.h
merge-recursive.c Merge branch 'en/t3433-rebase-stat-dirty-failure' into maint 2020-03-17 15:02:23 -07:00
merge-recursive.h hashmap_entry: remove first member requirement from docs 2019-10-07 10:20:12 +09:00
merge.c builtin/checkout: compute checkout metadata for checkouts 2020-03-16 11:37:02 -07:00
mergesort.c
mergesort.h
midx.c nth_packed_object_oid(): use customary integer return 2020-02-24 12:55:42 -08:00
midx.h midx: add MIDX_PROGRESS flag 2019-10-23 12:05:05 +09:00
name-hash.c Merge branch 'en/doc-typofix' 2019-12-01 09:04:35 -08:00
notes-cache.c
notes-cache.h
notes-merge.c
notes-merge.h
notes-utils.c strbuf: add and use strbuf_insertstr() 2020-02-10 09:04:45 -08:00
notes-utils.h
notes.c Merge branch 'jh/notes-fanout-fix' into maint 2020-03-17 15:02:22 -07:00
notes.h Merge branch 'dl/format-patch-notes-config-fixup' 2019-12-25 11:21:58 -08:00
object-store.h packed_object_info(): use object_id for returning delta base 2020-02-24 12:55:53 -08:00
object.c Merge branch 'jk/object-filter-with-bitmap' 2020-03-02 15:07:18 -08:00
object.h pack-bitmap: fix leak of haves/wants object lists 2020-02-13 09:08:58 -08:00
oidmap.c hashmap: introduce hashmap_free_entries 2019-10-07 10:20:11 +09:00
oidmap.h hashmap: use *_entry APIs for iteration 2019-10-07 10:20:11 +09:00
oidset.c
oidset.h Merge branch 'en/oidset-uninclude-hashmap' 2020-03-25 13:57:44 -07:00
pack-bitmap-write.c pack-objects: drop packlist index_pos optimization 2019-09-06 11:03:42 -07:00
pack-bitmap.c Merge branch 'jk/nth-packed-object-id' 2020-03-05 10:43:03 -08:00
pack-bitmap.h Merge branch 'jk/object-filter-with-bitmap' 2020-03-02 15:07:18 -08:00
pack-check.c pack-check: push oid lookup into loop 2020-02-24 12:55:53 -08:00
pack-objects.c pack-objects: convert oe_set_delta_ext() to use object_id 2020-02-24 12:55:52 -08:00
pack-objects.h pack-objects: convert oe_set_delta_ext() to use object_id 2020-02-24 12:55:52 -08:00
pack-revindex.c
pack-revindex.h
pack-write.c pack-write: use hash_to_hex when writing checksums 2019-08-19 15:04:58 -07:00
pack.h
packfile.c packfile: drop nth_packed_object_sha1() 2020-02-24 12:55:53 -08:00
packfile.h packfile: drop nth_packed_object_sha1() 2020-02-24 12:55:53 -08:00
pager.c
parse-options-cb.c parse-options: simplify parse_options_dup() 2020-02-10 09:45:49 -08:00
parse-options.c Merge branch 'pb/am-show-current-patch' 2020-03-09 11:21:19 -07:00
parse-options.h Merge branch 'pb/am-show-current-patch' 2020-03-09 11:21:19 -07:00
patch-delta.c
patch-ids.c hashmap: remove type arg from hashmap_{get,put,remove}_entry 2019-10-07 10:20:12 +09:00
patch-ids.h
path.c Merge branch 'bc/sha-256-part-1-of-4' 2020-03-26 17:11:20 -07:00
path.h path: add a function to check for path suffix 2019-08-26 10:36:13 -07:00
pathspec.c prefix_path: show gitdir if worktree unavailable 2020-03-15 09:35:46 -07:00
pathspec.h Merge branch 'hw/doc-in-header' 2019-12-16 13:08:39 -08:00
pkt-line.c
pkt-line.h pkt-line: fix a typo 2019-12-02 08:48:56 -08:00
preload-index.c
pretty.c Merge branch 'rs/strbuf-insertstr' 2020-02-17 13:22:17 -08:00
pretty.h
prio-queue.c
prio-queue.h
progress.c progress: create GIT_PROGRESS_DELAY 2019-11-27 10:57:10 +09:00
progress.h
promisor-remote.c promisor-remote: remove fetch_if_missing=0 2019-11-13 11:50:58 +09:00
promisor-remote.h Merge branch 'dl/honor-cflags-in-hdr-check' 2019-10-07 11:33:02 +09:00
prompt.c
prompt.h
protocol.c fetch: default to protocol version 2 2020-01-15 14:03:55 -08:00
protocol.h
quote.c quote: use isalnum() to check for alphanumeric characters 2020-02-24 09:30:29 -08:00
quote.h quote: add sq_append_quote_argv_pretty() 2019-08-09 10:48:02 -07:00
range-diff.c range-diff: mark pointers as const 2019-12-06 12:34:49 -08:00
range-diff.h Merge branch 'dl/range-diff-with-notes' 2019-12-16 13:08:46 -08:00
reachable.c pack-bitmap: basic noop bitmap filter infrastructure 2020-02-14 10:46:22 -08:00
reachable.h
read-cache.c Merge branch 'js/mingw-loosen-overstrict-tree-entry-checks' 2020-01-10 14:45:27 -08:00
README.md doc: recommend lore.kernel.org over public-inbox.org 2019-11-30 09:12:04 -08:00
rebase-interactive.c Merge branch 'rt/format-zero-length-fix' 2020-03-09 11:21:21 -07:00
rebase-interactive.h Merge branch 'en/rebase-backend' 2020-03-02 15:07:19 -08:00
rebase.c pull --rebase/remote rename: document and honor single-letter abbreviations rebase types 2020-02-10 10:52:10 -08:00
rebase.h pull --rebase/remote rename: document and honor single-letter abbreviations rebase types 2020-02-10 10:52:10 -08:00
ref-filter.c Merge branch 'dr/push-remote-ref-update' 2020-03-11 10:58:16 -07:00
ref-filter.h
reflog-walk.c
reflog-walk.h
refs.c hashmap_entry: remove first member requirement from docs 2019-10-07 10:20:12 +09:00
refs.h refs: move doc to refs.h 2019-11-18 15:21:28 +09:00
refspec.c
refspec.h remote: move doc to remote.h and refspec.h 2019-11-18 15:21:28 +09:00
RelNotes The first batch post 2.26 cycle 2020-03-25 13:57:44 -07:00
remote-curl.c Merge branch 'rs/show-progress-in-dumb-http-fetch' 2020-03-09 11:21:21 -07:00
remote-testsvn.c
remote.c remote: drop "explicit" parameter from remote_ref_for_branch() 2020-03-03 14:56:05 -08:00
remote.h remote: drop "explicit" parameter from remote_ref_for_branch() 2020-03-03 14:56:05 -08:00
replace-object.c replace-object: make replace operations thread-safe 2020-01-17 13:52:14 -08:00
replace-object.h replace-object: make replace operations thread-safe 2020-01-17 13:52:14 -08:00
repo-settings.c config: set pack.useSparse=true by default 2020-03-20 14:22:31 -07:00
repository.c repository: require a build flag to use SHA-256 2020-02-24 09:33:21 -08:00
repository.h Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
rerere.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
rerere.h
resolve-undo.c
resolve-undo.h
revision.c line-log: more responsive, incremental 'git log -L' 2020-05-11 09:33:56 -07:00
revision.h revision.c: use Bloom filters to speed up path based revision walks 2020-04-06 11:08:37 -07:00
run-command.c Merge branch 'bc/run-command-nullness-after-free-fix' into maint 2020-02-14 12:42:27 -08:00
run-command.h run-command.h: fix mis-indented struct member 2020-02-22 09:05:34 -08:00
send-pack.c Merge branch 'jk/send-pack-check-negative-with-quick' 2019-12-06 15:09:22 -08:00
send-pack.h
sequencer.c Merge branch 'bc/filter-process' 2020-03-26 17:11:20 -07:00
sequencer.h Merge branch 'pw/advise-rebase-skip' 2020-03-25 13:57:43 -07:00
serve.c
serve.h
server-info.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
setup.c Merge branch 'bc/sha-256-part-1-of-4' 2020-03-26 17:11:20 -07:00
sh-i18n--envsubst.c
sha1-array.c sha1-array: move doc to sha1-array.h 2019-11-18 15:21:28 +09:00
sha1-array.h sha1-array: move doc to sha1-array.h 2019-11-18 15:21:28 +09:00
sha1-file.c Merge branch 'bc/sha-256-part-1-of-4' 2020-03-26 17:11:20 -07:00
sha1-lookup.c Merge branch 'js/azure-pipelines-msvc' 2019-10-15 13:48:00 +09:00
sha1-lookup.h
sha1-name.c nth_packed_object_oid(): use customary integer return 2020-02-24 12:55:42 -08:00
sha1dc_git.c hex: drop sha1_to_hex() 2019-11-13 10:09:10 +09:00
sha1dc_git.h
shallow.c Merge branch 'rs/dedup-includes' 2019-10-11 14:24:48 +09:00
shell.c shell: use skip_prefix() instead of starts_with() 2019-11-27 11:18:24 +09:00
shortlog.h
sideband.c
sideband.h
sigchain.c
sigchain.h sigchain: move doc to sigchain.h 2019-11-18 15:21:29 +09:00
split-index.c
split-index.h
stable-qsort.c Move git_sort(), a stable sort, into into libgit.a 2019-10-02 14:44:51 +09:00
strbuf.c credential: allow wildcard patterns when matching config 2020-02-20 13:05:43 -08:00
strbuf.h Merge branch 'bc/wildcard-credential' 2020-03-05 10:43:02 -08:00
streaming.c streaming: allow open_istream() to handle any repo 2020-01-31 10:45:39 -08:00
streaming.h streaming: allow open_istream() to handle any repo 2020-01-31 10:45:39 -08:00
string-list.c
string-list.h Merge branch 'en/string-list-can-be-custom-sorted' into maint 2020-02-14 12:42:27 -08:00
sub-process.c hashmap: remove type arg from hashmap_{get,put,remove}_entry 2019-10-07 10:20:12 +09:00
sub-process.h hashmap_entry: remove first member requirement from docs 2019-10-07 10:20:12 +09:00
submodule-config.c Merge branch 'mr/show-config-scope' 2020-02-17 13:22:17 -08:00
submodule-config.h submodule-config: add skip_if_read option to repo_read_gitmodules() 2020-01-17 13:52:14 -08:00
submodule.c Merge branch 'dt/submodule-rm-with-stale-cache' into maint 2020-03-17 15:02:21 -07:00
submodule.h get_superproject_working_tree(): return strbuf 2020-03-10 11:41:40 -07:00
symlinks.c
tag.c commit, tag: don't set parsed bit for parse failures 2019-10-28 14:04:49 +09:00
tag.h tag: factor out get_tagged_oid() 2019-09-05 14:10:18 -07:00
tar.h kset.h, tar.h: add missing header guard to prevent multiple inclusion 2019-11-07 20:12:04 +09:00
tempfile.c
tempfile.h
thread-utils.c
thread-utils.h
tmp-objdir.c
tmp-objdir.h
trace.c packfile: drop release_pack_memory() 2019-08-13 12:21:33 -07:00
trace.h trace: move doc to trace.h 2019-11-18 15:21:29 +09:00
trace2.c
trace2.h trace2: move doc to trace2.h 2019-11-18 15:21:29 +09:00
trailer.c
trailer.h
transport-helper.c C: use skip_prefix() to avoid hardcoded string length 2020-01-31 13:03:45 -08:00
transport-internal.h transport: teach all vtables to allow fetch first 2019-08-22 14:20:39 -07:00
transport.c Merge branch 'jk/no-flush-upon-disconnecting-slrpc-transport' into maint 2020-02-14 12:42:28 -08:00
transport.h remote-curl: pass on atomic capability to remote side 2019-10-17 16:08:22 +09:00
tree-diff.c diff: halt tree-diff early after max_changes 2020-03-30 09:59:53 -07:00
tree-walk.c tree-walk.c: break circular dependency with unpack-trees 2020-02-04 10:32:15 -08:00
tree-walk.h tree-walk.c: break circular dependency with unpack-trees 2020-02-04 10:32:15 -08:00
tree.c tree: simplify parse_tree_indirect() 2019-09-03 15:10:53 -07:00
tree.h
unicode-width.h unicode: update the width tables to Unicode 13.0 2020-03-17 15:06:37 -07:00
unimplemented.sh
unix-socket.c
unix-socket.h
unpack-trees.c Merge branch 'bc/filter-process' 2020-03-26 17:11:20 -07:00
unpack-trees.h builtin/checkout: compute checkout metadata for checkouts 2020-03-16 11:37:02 -07:00
upload-pack.c config: split repo scope to local and worktree 2020-02-10 10:32:20 -08:00
upload-pack.h
url.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
url.h
urlmatch.c credential: allow wildcard patterns when matching config 2020-02-20 13:05:43 -08:00
urlmatch.h credential: allow wildcard patterns when matching config 2020-02-20 13:05:43 -08:00
usage.c vreportf(): avoid relying on stdio buffering 2019-11-02 15:20:21 +09:00
userdiff.c Merge branch 'ln/userdiff-elixir' 2019-12-25 11:21:59 -08:00
userdiff.h
utf8.c utf8: use skip_iprefix() in same_utf_encoding() 2019-11-10 16:04:36 +09:00
utf8.h
varint.c
varint.h
version.c
version.h
versioncmp.c
walker.c Merge branch 'rs/show-progress-in-dumb-http-fetch' 2020-03-09 11:21:21 -07:00
walker.h remote-curl: show progress for fetches over dumb HTTP 2020-03-03 13:15:40 -08:00
wildmatch.c
wildmatch.h
worktree.c Merge branch 'bc/sha-256-part-1-of-4' 2020-03-26 17:11:20 -07:00
worktree.h worktree: add utility to find worktree by pathname 2020-02-24 13:04:30 -08:00
wrap-for-bin.sh
wrapper.c Merge branch 'ah/cleanups' 2019-10-09 14:01:00 +09:00
write-or-die.c
ws.c
wt-status.c Merge branch 'bc/object-id-part17' 2019-10-11 14:24:46 +09:00
wt-status.h commit: give correct advice for empty commit during a rebase 2019-12-06 09:32:02 -08:00
xdiff-interface.c xdiff: avoid computing non-zero offset from NULL pointer 2020-01-28 23:13:25 -08:00
xdiff-interface.h Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
zlib.c

Build Status

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 https://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-<commandname>.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://lore.kernel.org/git/, http://marc.info/?l=git and other archival sites.

Issues which are security relevant should be disclosed privately to the Git Security mailing list git-security@googlegroups.com.

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