Git with broken hash generation to generate collisions between object IDs. Don't use this! https://undefinedbehavior.de/posts/commit-vandalism/
Go to file
Jeff King b337398266 diff: avoid useless filespec population
builtin_diff calls fill_mmfile fairly early, which in turn
calls diff_populate_filespec, which actually retrieves the
file's blob contents into a buffer. Long ago, this was
sensible as we would need to look at the blobs eventually.

These days, however, we may not ever want those blobs if we
end up using a textconv cache, and for large binary files
(exactly the sort for which you might have a textconv
cache), just retrieving the objects can be costly.

This patch just pushes the fill_mmfile call a bit later, so
we can avoid populating the filespec in some cases.  There
is one thing to note that looks like a bug but isn't. We
push the fill_mmfile down into the first branch of a
conditional. It seems like we would need it on the other
branch, too, but we don't; fill_textconv does it for us (in
fact, before this, we were just writing over the results of
the fill_mmfile on that branch).

Here's a timing sample on a commit with 45 changed jpgs and
avis. The result is fully textconv cached, but we still
wasted a lot of time just pulling the blobs from storage.
The total size of the blobs (source and dest) is about
180M.

  [before]
  $ time git show >/dev/null
  real    0m0.352s
  user    0m0.148s
  sys     0m0.200s

  [after]
  $ time git show >/dev/null
  real    0m0.009s
  user    0m0.004s
  sys     0m0.004s

And that's on a warm cache. On a cold cache, the "after"
case is not much worse, but the "before" case has to do an
extra 180M of I/O.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02 00:11:20 -07:00
block-sha1
builtin make commit_tree a library function 2010-04-01 23:53:54 -07:00
compat Sync with 1.7.0.4 2010-03-31 15:14:27 -07:00
contrib Fix a spelling mistake in a git-p4 console message 2010-03-20 09:18:48 -07:00
Documentation diff: cache textconv output 2010-04-02 00:05:31 -07:00
git_remote_helpers
git-gui Merge git://repo.or.cz/git-gui 2010-02-07 15:52:28 -08:00
gitk-git Merge git://git.kernel.org/pub/scm/gitk/gitk 2010-02-05 21:22:59 -08:00
gitweb Sync with 1.7.0.4 2010-03-31 15:14:27 -07:00
perl git-svn: support fetch with autocrlf on 2010-03-05 02:57:57 -08:00
ppc
t diff: cache textconv output 2010-04-02 00:05:31 -07:00
templates
xdiff refactor merge flags into xmparam_t 2010-03-02 11:51:48 -08:00
.gitattributes .gitattributes: detect 8-space indent in shell scripts 2010-01-06 12:22:25 -08:00
.gitignore Makefile: lazily compute header dependencies 2010-01-26 10:08:55 -06:00
.mailmap .mailmap: Map the the first submissions of MJG by e-mail 2010-03-21 16:30:17 -07:00
abspath.c make_absolute_path(): Do not append redundant slash 2010-02-14 13:21:31 -08:00
advice.c Reword "detached HEAD" notification 2010-01-29 22:11:00 -08:00
advice.h Reword "detached HEAD" notification 2010-01-29 22:11:00 -08:00
alias.c
alloc.c
archive-tar.c
archive-zip.c
archive.c Merge branch 'jc/conflict-marker-size' 2010-01-20 20:28:51 -08:00
archive.h
attr.c git_attr(): fix function signature 2010-01-16 20:39:59 -08:00
attr.h git_attr(): fix function signature 2010-01-16 20:39:59 -08:00
base85.c Merge branch 'maint-1.6.2' into maint-1.6.3 2010-01-18 21:29:47 -08:00
bisect.c Merge branch 'cc/maint-bisect-paths' into maint-1.6.6 2010-03-07 14:53:35 -08:00
bisect.h builtin-rev-list.c: mark file-local function static 2010-01-11 23:16:16 -08:00
blob.c Replace parse_blob() with an explanatory comment 2010-01-18 17:04:02 -08:00
blob.h Replace parse_blob() with an explanatory comment 2010-01-18 17:04:02 -08:00
branch.c branch: warn and refuse to set a branch as a tracking branch of itself. 2010-01-18 17:46:28 -08:00
branch.h
builtin.h make commit_tree a library function 2010-04-01 23:53:54 -07:00
bundle.c
bundle.h
cache-tree.c
cache-tree.h
cache.h make commit_tree a library function 2010-04-01 23:53:54 -07:00
check_bindir
check-builtins.sh
check-racy.c
color.c Merge branch 'jc/color-attrs' into maint 2010-03-24 16:24:13 -07:00
color.h Merge branch 'jc/color-attrs' into maint 2010-03-24 16:24:13 -07:00
combine-diff.c Give the hunk comment its own color 2009-11-28 10:05:44 -08:00
command-list.txt Add git-http-backend to command-list. 2009-12-26 14:12:34 -08:00
commit.c make commit_tree a library function 2010-04-01 23:53:54 -07:00
commit.h make commit_tree a library function 2010-04-01 23:53:54 -07:00
config.c Merge branch 'jc/ident' 2010-01-20 14:39:52 -08:00
config.mak.in Make NO_PTHREADS the sole thread configuration variable 2010-01-31 11:50:50 -08:00
configure.ac Merge branch 'bw/no-python-autoconf' 2010-02-02 21:48:13 -08:00
connect.c Merge branch 'fl/askpass' 2010-03-20 11:29:35 -07:00
convert.c Merge branch 'sp/maint-push-sideband' into maint 2010-03-02 22:54:50 -08:00
copy.c
COPYING Update COPYING with GPLv2 with new FSF address 2010-01-17 14:29:37 -08:00
csum-file.c
csum-file.h
ctype.c
daemon.c daemon: parse_host_and_port SIGSEGV if port is specified 2010-03-20 08:49:31 -07:00
date.c Merge branch 'jc/maint-reflog-bad-timestamp' 2010-01-27 14:57:37 -08:00
decorate.c
decorate.h
delta.h Fix big left-shifts of unsigned char 2009-06-18 09:22:46 -07:00
diff-delta.c
diff-lib.c Merge branch 'jl/submodule-diff-dirtiness' 2010-03-24 16:25:43 -07:00
diff-no-index.c
diff.c diff: avoid useless filespec population 2010-04-02 00:11:20 -07:00
diff.h git status: ignoring untracked files must apply to submodules too 2010-03-13 21:56:35 -08:00
diffcore-break.c
diffcore-delta.c Fix diff -B/--dirstat miscounting of newly added contents 2009-12-05 10:54:17 -08:00
diffcore-order.c
diffcore-pickaxe.c
diffcore-rename.c
diffcore.h git diff --submodule: Show detailed dirty status of submodules 2010-03-04 22:16:33 -08:00
dir.c Merge branch 'jk/maint-add-ignored-dir' into maint 2010-03-24 16:24:03 -07:00
dir.h Merge branch 'nd/sparse' 2010-01-13 11:58:34 -08:00
editor.c editor: use run_command's shell feature 2010-01-05 23:41:51 -08:00
entry.c Merge branch 'jc/symbol-static' 2010-01-20 14:37:25 -08:00
environment.c Refactor list of of repo-local env vars 2010-02-24 16:24:25 -08:00
exec_cmd.c Print RUNTIME_PREFIX warning only when GIT_TRACE is set 2010-02-23 13:20:15 -08:00
exec_cmd.h
fast-import.c refactor duplicated encode_header in pack-objects and fast-import 2010-02-17 15:30:20 -08:00
fetch-pack.h Smart fetch over HTTP: client side 2009-11-04 17:58:15 -08:00
fixup-builtins
fsck.c
fsck.h
generate-cmdlist.sh
git-add--interactive.perl Merge branch 'jk/maint-add--interactive-delete' into maint 2010-03-08 00:36:00 -08:00
git-am.sh Merge branch 'tr/notes-display' 2010-03-24 16:26:43 -07:00
git-archimport.perl
git-bisect.sh
git-compat-util.h Merge branch 'il/maint-xmallocz' into maint 2010-02-10 13:02:16 -08:00
git-cvsexportcommit.perl
git-cvsimport.perl cvsimport: new -R option: generate .git/cvs-revisions mapping 2010-02-06 11:01:59 -08:00
git-cvsserver.perl Merge branch 'gp/maint-cvsserver' 2010-01-28 00:46:33 -08:00
git-difftool--helper.sh Make difftool.prompt fall back to mergetool.prompt 2010-01-22 15:57:45 -08:00
git-difftool.perl difftool: Fix '--gui' when diff.guitool is unconfigured 2010-03-28 09:29:12 -07:00
git-filter-branch.sh Merge branch 'maint' 2010-02-11 23:06:32 -08:00
git-instaweb.sh fix portability issues with $ in double quotes 2010-01-26 15:16:54 -08:00
git-lost-found.sh
git-merge-octopus.sh octopus: remove dead code 2009-12-13 23:40:24 -08:00
git-merge-one-file.sh
git-merge-resolve.sh
git-mergetool--lib.sh add shebang line to git-mergetool--lib.sh 2010-01-29 09:56:51 -08:00
git-mergetool.sh
git-parse-remote.sh Do not install shell libraries executable 2010-01-31 11:53:10 -08:00
git-pull.sh Merge branch 'maint' 2010-03-20 11:29:19 -07:00
git-quiltimport.sh
git-rebase--interactive.sh Merge branch 'cc/cherry-pick-ff' 2010-03-28 21:52:28 -07:00
git-rebase.sh Merge branch 'tr/notes-display' 2010-03-24 16:26:43 -07:00
git-relink.perl
git-repack.sh
git-request-pull.sh request-pull: avoid mentioning that the start point is a single commit 2010-01-29 22:26:39 -08:00
git-send-email.perl send-email: add --no-cc, --no-to, and --no-bcc 2010-03-08 15:55:42 -08:00
git-sh-setup.sh Merge branch 'gb/maint-submodule-env' into maint 2010-03-08 00:36:02 -08:00
git-stash.sh stash: suggest the correct command line for unknown options. 2010-03-06 20:00:42 -08:00
git-submodule.sh Merge branch 'jh/maint-submodule-status-in-void' 2010-03-24 16:55:37 -07:00
git-svn.perl Merge branch 'fl/askpass' 2010-03-20 11:29:35 -07:00
GIT-VERSION-GEN Git 1.7.0.4 2010-03-31 15:12:08 -07:00
git-web--browse.sh
git.c Merge branch 'jh/notes' 2010-03-15 00:52:06 -07:00
git.spec.in RPM packaging: use %global inside %{!?...} 2010-01-31 11:33:44 -08:00
graph.c Add GIT_COLOR_BOLD_* and GIT_COLOR_BG_* 2010-03-07 11:09:02 -08:00
graph.h
grep.c Merge branch 'ml/color-grep' 2010-03-20 11:29:36 -07:00
grep.h Merge branch 'ml/color-grep' 2010-03-20 11:29:36 -07:00
hash.c
hash.h
help.c Remove hyphen from "git-command" in two error messages 2010-02-15 18:20:54 -08:00
help.h
hex.c slim down "git show-index" 2010-01-21 20:03:45 -08:00
http-backend.c Smart-http: check if repository is OK to export before serving it 2010-01-06 01:16:50 -08:00
http-fetch.c http: init and cleanup separately from http-walker 2010-03-02 11:10:36 -08:00
http-push.c http-push: remove "|| 1" to enable verbose check 2010-03-02 11:10:36 -08:00
http-walker.c http: init and cleanup separately from http-walker 2010-03-02 11:10:36 -08:00
http.c git-core: Support retrieving passwords with GIT_ASKPASS 2010-03-04 22:05:13 -08:00
http.h http.c: mark file-local functions static 2010-01-12 01:06:08 -08:00
ident.c ident.c: replace fprintf with fputs to suppress compiler warning 2010-01-19 15:25:38 -08:00
imap-send.c imap-send: suppress warning about cleartext password with CRAM-MD5 2010-03-28 09:24:25 -07:00
INSTALL INSTALL: document a simpler way to run uninstalled builds 2009-12-03 11:38:21 -08:00
levenshtein.c
levenshtein.h Typofixes outside documentation area 2010-02-03 21:28:17 -08:00
list-objects.c
list-objects.h
ll-merge.c refactor merge flags into xmparam_t 2010-03-02 11:51:48 -08:00
ll-merge.h Merge branch 'jc/conflict-marker-size' 2010-01-20 20:28:51 -08:00
lockfile.c lockfile: show absolute filename in unable_to_lock_message 2010-01-12 15:48:24 -08:00
log-tree.c git log -p -m: document -m and honor --first-parent 2010-02-12 11:32:23 -08:00
log-tree.h
mailmap.c mailmap.c: remove unused function 2010-01-12 01:06:09 -08:00
mailmap.h mailmap.c: remove unused function 2010-01-12 01:06:09 -08:00
Makefile introduce notes-cache interface 2010-04-01 23:58:30 -07:00
match-trees.c Make "subtree" part more orthogonal to the rest of merge-recursive. 2010-01-17 22:46:28 -08:00
merge-file.c merge-tree: use ll_merge() not xdl_merge() 2010-01-16 23:45:33 -08:00
merge-recursive.c refactor duplicated fill_mm() in checkout and merge-recursive 2010-02-17 15:11:33 -08:00
merge-recursive.h Merge branch 'ap/merge-backend-opts' 2010-01-20 20:28:50 -08:00
name-hash.c
notes-cache.c introduce notes-cache interface 2010-04-01 23:58:30 -07:00
notes-cache.h introduce notes-cache interface 2010-04-01 23:58:30 -07:00
notes.c Merge branch 'tr/notes-display' 2010-03-24 16:26:43 -07:00
notes.h notes: track whether notes_trees were changed at all 2010-03-12 21:55:40 -08:00
object.c object.c: remove unused functions 2010-01-17 22:49:36 -08:00
object.h object.c: remove unused functions 2010-01-17 22:49:36 -08:00
pack-check.c
pack-refs.c
pack-refs.h
pack-revindex.c janitor: useless checks before free 2009-07-22 21:57:41 -07:00
pack-revindex.h
pack-write.c move encode_in_pack_object_header() to a better place 2010-02-23 13:10:56 -08:00
pack.h move encode_in_pack_object_header() to a better place 2010-02-23 13:10:56 -08:00
pager.c Make 'git var GIT_PAGER' always print the configured pager 2010-02-14 18:23:17 -08:00
parse-options.c parse-options: add parse_options_concat() to concat options 2010-03-06 23:58:33 -08:00
parse-options.h parse-options: add parse_options_concat() to concat options 2010-03-06 23:58:33 -08:00
patch-delta.c Fix integer overflow in patch_delta() 2010-01-26 12:57:59 -08:00
patch-ids.c
patch-ids.h Refactor patch-id filtering out of git-cherry and git-format-patch. 2007-04-11 20:02:03 -07:00
path.c Merge branch 'nd/root-git' 2010-03-07 12:47:15 -08:00
pkt-line.c
pkt-line.h
preload-index.c Make ce_uptodate() trustworthy again 2010-01-24 00:15:29 -08:00
pretty.c Support showing notes from more than one notes tree 2010-03-12 21:55:39 -08:00
progress.c
progress.h
quote.c Fix invalid read in quote_c_style_counted 2010-02-06 10:55:03 -08:00
quote.h quote.c: mark file-local function static 2010-01-12 01:06:08 -08:00
reachable.c
reachable.h
read-cache.c Correct spelling of 'REUC' extension 2010-02-02 09:54:34 -08:00
README
reflog-walk.c
reflog-walk.h
refs.c Merge branch 'jc/maint-refs-dangling' into maint 2010-03-31 15:09:32 -07:00
refs.h Support showing notes from more than one notes tree 2010-03-12 21:55:39 -08:00
RelNotes Prepare for 1.7.0.4 2010-03-28 21:32:25 -07:00
remote-curl.c Merge branch 'tc/http-cleanup' 2010-03-15 00:58:50 -07:00
remote.c refactor ref status logic for pushing 2010-01-09 23:34:10 -08:00
remote.h refactor ref status logic for pushing 2010-01-09 23:34:10 -08:00
replace_object.c
rerere.c rerere: fix memory leak if rerere images can't be read 2010-02-23 14:24:43 -08:00
rerere.h Merge branch 'jc/cache-unmerge' 2010-01-20 14:46:35 -08:00
resolve-undo.c build: make code "-Wpointer-arith" clean 2010-02-01 22:04:03 -08:00
resolve-undo.h build: make code "-Wpointer-arith" clean 2010-02-01 22:04:03 -08:00
revision.c Merge branch 'tr/notes-display' 2010-03-24 16:26:43 -07:00
revision.h Merge branch 'tr/notes-display' 2010-03-24 16:26:43 -07:00
run-command.c Merge branch 'mw/maint-gcc-warns-unused-write' into maint 2010-03-08 00:36:02 -08:00
run-command.h Merge branch 'sp/maint-push-sideband' into maint 2010-03-02 22:54:50 -08:00
send-pack.h git-push: make git push --porcelain print "Done" 2010-02-28 10:39:30 -08:00
server-info.c
setup.c Merge branch 'nd/root-git' 2010-03-07 12:47:15 -08:00
sha1_file.c make commit_tree a library function 2010-04-01 23:53:54 -07:00
sha1_name.c sha1_name: fix segfault caused by invalid index access 2010-02-28 10:32:06 -08:00
sha1-lookup.c
sha1-lookup.h
shallow.c
shell.c
shortlog.h
show-index.c slim down "git show-index" 2010-01-21 20:03:45 -08:00
sideband.c Smart push over HTTP: client side 2009-11-04 17:58:15 -08:00
sideband.h
sigchain.c
sigchain.h
strbuf.c Merge branch 'ap/merge-backend-opts' 2010-01-20 20:28:50 -08:00
strbuf.h Merge branch 'jc/maint-strbuf-add-fix-doubling' 2010-01-20 14:43:09 -08:00
string-list.c string-list: new for_each_string_list() function 2009-02-27 15:19:08 -08:00
string-list.h string-list: rename the include guard to STRING_LIST_H 2010-01-09 23:39:11 -08:00
submodule.c git status: ignoring untracked files must apply to submodules too 2010-03-13 21:56:35 -08:00
submodule.h git status: ignoring untracked files must apply to submodules too 2010-03-13 21:56:35 -08:00
symlinks.c symlinks.c: remove unused functions 2010-01-17 22:49:36 -08:00
tag.c
tag.h
tar.h
test-chmtime.c Typofixes outside documentation area 2010-02-03 21:28:17 -08:00
test-ctype.c
test-date.c
test-delta.c
test-dump-cache-tree.c add test-dump-cache-tree in Makefile 2009-02-03 22:11:44 -08:00
test-genrandom.c
test-index-version.c
test-match-trees.c
test-parse-options.c
test-path-utils.c
test-run-command.c start_command: detect execvp failures early 2010-01-10 10:15:03 -08:00
test-sha1.c
test-sha1.sh
test-sigchain.c
thread-utils.c
thread-utils.h
trace.c
transport-helper.c Merge branch 'tc/transport-verbosity' 2010-03-15 00:58:42 -07:00
transport.c Merge branch 'tc/transport-verbosity' 2010-03-15 00:58:42 -07:00
transport.h Merge branch 'tc/transport-verbosity' 2010-03-15 00:58:42 -07:00
tree-diff.c Performance optimization for detection of modified submodules 2010-01-18 17:28:21 -08:00
tree-walk.c Merge branch 'maint-1.6.6' into maint 2010-02-14 18:59:14 -08:00
tree-walk.h
tree.c
tree.h
unimplemented.sh
unpack-trees.c Merge branch 'jc/fix-tree-walk' 2010-01-24 17:35:58 -08:00
unpack-trees.h Merge branch 'jc/fix-tree-walk' 2010-01-24 17:35:58 -08:00
upload-pack.c run-command: support custom fd-set in async 2010-02-05 20:57:22 -08:00
usage.c
userdiff.c diff: cache textconv output 2010-04-02 00:05:31 -07:00
userdiff.h diff: cache textconv output 2010-04-02 00:05:31 -07:00
utf8.c Merge branch 'rs/optim-text-wrap' into maint 2010-03-04 22:26:33 -08:00
utf8.h Merge branch 'rs/optim-text-wrap' into maint 2010-03-04 22:26:33 -08:00
walker.c
walker.h http: init and cleanup separately from http-walker 2010-03-02 11:10:36 -08:00
wrap-for-bin.sh wrap-for-bin: do not export an empty GIT_TEMPLATE_DIR 2010-03-02 16:27:03 -08:00
wrapper.c Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later. 2010-02-22 15:24:46 -08:00
write_or_die.c
ws.c git_attr(): fix function signature 2010-01-16 20:39:59 -08:00
wt-status.c Merge branch 'jl/submodule-diff-dirtiness' 2010-03-24 16:25:43 -07:00
wt-status.h git status: Show detailed dirty status of submodules in long format 2010-03-08 15:49:23 -08:00
xdiff-interface.c refactor duplicated fill_mm() in checkout and merge-recursive 2010-02-17 15:11:33 -08:00
xdiff-interface.h refactor duplicated fill_mm() in checkout and merge-recursive 2010-02-17 15:11:33 -08:00

////////////////////////////////////////////////////////////////

	GIT - the stupid content tracker

////////////////////////////////////////////////////////////////

"git" can mean anything, 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

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.
It was originally written by Linus Torvalds with help of a group of
hackers around the net. It is currently maintained by Junio C Hamano.

Please read the file INSTALL for installation instructions.

See Documentation/gittutorial.txt to get started, then see
Documentation/everyday.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).

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

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. 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://marc.theaimsgroup.com/?l=git and other archival sites.

The messages titled "A note from the maintainer", "What's in
git.git (stable)" and "What's cooking in git.git (topics)" and
the discussion following them on the mailing list give a good
reference for project status, development direction and
remaining tasks.