git-commit-vandalism/builtin
Junio C Hamano 6d4bb3833c fetch: verify we have everything we need before updating our ref
The "git fetch" command works in two phases. The remote side tells us what
objects are at the tip of the refs we are fetching from, and transfers the
objects missing from our side. After storing the objects in our repository,
we update our remote tracking branches to point at the updated tips of the
refs.

A broken or malicious remote side could send a perfectly well-formed pack
data during the object transfer phase, but there is no guarantee that the
given data actually fill the gap between the objects we originally had and
the refs we are updating to.

Although this kind of breakage can be caught by running fsck after a
fetch, it is much cheaper to verify that everything that is reachable from
the tips of the refs we fetched are indeed fully connected to the tips of
our current set of refs before we update them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-09 14:57:53 -07:00
..
add.c Merge branch 'ci/commit--interactive-atomic' 2011-05-16 16:47:10 -07:00
annotate.c
apply.c Merge branch 'jc/maint-add-p-overlapping-hunks' into maint 2011-05-16 16:36:46 -07:00
archive.c
bisect--helper.c
blame.c blame: add --line-porcelain output format 2011-05-09 15:27:50 -07:00
branch.c Merge branch 'jk/format-patch-am' 2011-05-31 12:19:11 -07:00
bundle.c
cat-file.c
check-attr.c
check-ref-format.c
checkout-index.c
checkout.c Merge branch 'jk/format-patch-am' 2011-05-31 12:19:11 -07:00
clean.c
clone.c Merge branch 'maint' 2011-05-25 15:25:44 -07:00
commit-tree.c
commit.c Merge branch 'ci/commit--interactive-atomic' 2011-05-16 16:47:10 -07:00
config.c config: Give error message when not changing a multivar 2011-05-17 21:01:29 -07:00
count-objects.c
describe.c Merge branch 'lt/default-abbrev' into maint 2011-04-03 12:32:51 -07:00
diff-files.c
diff-index.c
diff-tree.c
diff.c Merge branch 'jc/rename-degrade-cc-to-c' 2011-04-28 14:11:43 -07:00
fast-export.c
fetch-pack.c Merge branch 'jk/haves-from-alternate-odb' 2011-05-29 23:51:22 -07:00
fetch.c fetch: verify we have everything we need before updating our ref 2011-09-09 14:57:53 -07:00
fmt-merge-msg.c
for-each-ref.c
fsck.c
gc.c
grep.c Merge branch 'mk/grep-pcre' 2011-05-30 00:00:07 -07:00
hash-object.c index_fd(): turn write_object and format_check arguments into one flag 2011-05-09 11:58:19 -07:00
help.c
index-pack.c sparse: Fix an "symbol 'cmd_index_pack' not declared" warning 2011-04-11 10:35:25 -07:00
init-db.c Merge branch 'maint' 2011-05-25 15:25:44 -07:00
log.c Merge branch 'jk/format-patch-am' 2011-05-31 12:19:11 -07:00
ls-files.c pathspec: rename per-item field has_wildcard to use_wildcard 2011-04-05 09:30:36 -07:00
ls-remote.c ls-remote: the --exit-code option reports "no matching refs" 2011-05-18 14:37:46 -07:00
ls-tree.c pathspec: rename per-item field has_wildcard to use_wildcard 2011-04-05 09:30:36 -07:00
mailinfo.c mailinfo: always clean up rfc822 header folding 2011-05-26 14:13:38 -07:00
mailsplit.c
merge-base.c Documentation: update to git-merge-base --octopus 2011-04-15 10:13:52 -07:00
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c sparse: Fix an "symbol 'merge_file' not decared" warning 2011-04-11 10:35:25 -07:00
merge.c Merge branch 'jk/format-patch-am' 2011-05-31 12:19:11 -07:00
mktag.c read_sha1_file(): get rid of read_sha1_file_repl() madness 2011-05-15 15:23:33 -07:00
mktree.c
mv.c
name-rev.c
notes.c notes remove: --stdin reads from the standard input 2011-05-19 10:54:16 -07:00
pack-objects.c list-objects: pass callback data to show_objects() 2011-09-01 15:46:12 -07:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c add description parameter to OPT__DRY_RUN 2010-11-15 09:57:37 -08:00
push.c Merge branch 'ab/i18n-st' 2011-04-01 17:55:55 -07:00
read-tree.c Teach read-tree the -n|--dry-run option 2011-05-25 15:04:25 -07:00
receive-pack.c receive-pack: eliminate duplicate .have refs 2011-05-19 20:02:31 -07:00
reflog.c
remote-ext.c
remote-fd.c
remote.c Merge branch 'jk/maint-remote-mirror-safer' 2011-05-31 12:08:52 -07:00
replace.c
rerere.c rerere: libify rerere_clear() and rerere_gc() 2011-05-08 12:55:34 -07:00
reset.c Merge branch 'ab/i18n-st' 2011-04-01 17:55:55 -07:00
rev-list.c rev-list --verify-object 2011-09-01 15:46:13 -07:00
rev-parse.c show: --ignore-missing 2011-05-19 10:55:54 -07:00
revert.c revert: allow reverting a root commit 2011-05-16 13:01:45 -07:00
rm.c
send-pack.c Merge branch 'jk/git-connection-deadlock-fix' 2011-05-19 20:37:20 -07:00
shortlog.c Merge branch 'jk/format-patch-am' 2011-05-31 12:19:11 -07:00
show-branch.c Merge branch 'jk/format-patch-am' 2011-05-31 12:19:11 -07:00
show-ref.c
stripspace.c
symbolic-ref.c
tag.c tag: disallow '-' as tag name 2011-05-10 08:45:37 -07:00
tar-tree.c
unpack-file.c
unpack-objects.c
update-index.c index_fd(): turn write_object and format_check arguments into one flag 2011-05-09 11:58:19 -07:00
update-ref.c
update-server-info.c
upload-archive.c
var.c
verify-pack.c
verify-tag.c
write-tree.c