1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-15 21:53:44 +01:00
Find a file
Linus Torvalds ac54c277f0 Be more careful about zlib return values
When creating a new object, we use "deflate(stream, Z_FINISH)" in a loop
until it no longer returns Z_OK, and then we do "deflateEnd()" to finish
up business.

That should all work, but the fact is, it's not how you're _supposed_ to
use the zlib return values properly:

 - deflate() should never return Z_OK in the first place, except if we
   need to increase the output buffer size (which we're not doing, and
   should never need to do, since we pre-allocated a buffer that is
   supposed to be able to hold the output in full). So the "while()" loop
   was incorrect: Z_OK doesn't actually mean "ok, continue", it means "ok,
   allocate more memory for me and continue"!

 - if we got an error return, we would consider it to be end-of-stream,
   but it could be some internal zlib error.  In short, we should check
   for Z_STREAM_END explicitly, since that's the only valid return value
   anyway for the Z_FINISH case.

 - we never checked deflateEnd() return codes at all.

Now, admittedly, none of these issues should ever happen, unless there is
some internal bug in zlib. So this patch should make zero difference, but
it seems to be the right thing to do.

We should probablybe anal and check the return value of "deflateInit()"
too!

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-20 22:17:32 -07:00
arm
compat
contrib contrib/continuous: a continuous integration build manager 2007-03-19 22:21:19 -07:00
Documentation Provide some technical documentation for shallow clones 2007-03-19 22:19:29 -07:00
git-gui Merge branch 'master' of git://repo.or.cz/git-gui 2007-03-12 23:14:07 -07:00
gitweb gitweb: Don't escape attributes in CGI.pm HTML methods 2007-03-06 19:04:07 -08:00
mozilla-sha1
perl Do not output "GEN " when generating perl.mak 2007-03-14 01:33:49 -07:00
ppc
t don't ever allow SHA1 collisions to exist by fetching a pack 2007-03-20 22:08:25 -07:00
templates update-hook: fix incorrect use of git-describe and sed for finding previous tag 2007-03-14 09:14:51 -07:00
xdiff xdiff/xutils.c(xdl_hash_record): factor out whitespace handling 2007-03-19 22:17:25 -07:00
.gitignore Merge branch 'jc/fetch' 2007-03-14 01:40:19 -07:00
.mailmap
alloc.c
archive-tar.c
archive-zip.c
archive.h
base85.c
blob.c
blob.h
builtin-add.c add: Support specifying an excludes file with a configuration variable 2007-03-09 00:06:00 -08:00
builtin-annotate.c
builtin-apply.c Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
builtin-archive.c Merge branch 'maint' 2007-03-03 19:47:46 -08:00
builtin-blame.c blame: micro-optimize cmp_suspect() 2007-03-19 22:17:10 -07:00
builtin-branch.c git-fetch, git-branch: Support local --track via a special remote '.' 2007-03-16 02:10:12 -07:00
builtin-bundle.c Replace fork_with_pipe in bundle with run_command 2007-03-12 23:40:17 -07:00
builtin-cat-file.c
builtin-check-ref-format.c
builtin-checkout-index.c
builtin-commit-tree.c
builtin-config.c git-config: document --rename-section, provide --remove-section 2007-03-03 19:59:37 -08:00
builtin-count-objects.c Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
builtin-describe.c
builtin-diff-files.c Allow git-diff exit with codes similar to diff(1) 2007-03-14 16:21:19 -07:00
builtin-diff-index.c Allow git-diff exit with codes similar to diff(1) 2007-03-14 16:21:19 -07:00
builtin-diff-tree.c Allow git-diff exit with codes similar to diff(1) 2007-03-14 16:21:19 -07:00
builtin-diff.c Allow git-diff exit with codes similar to diff(1) 2007-03-14 16:21:19 -07:00
builtin-fetch--tool.c
builtin-fmt-merge-msg.c
builtin-for-each-ref.c General const correctness fixes 2007-03-07 10:47:10 -08:00
builtin-fsck.c Merge branch 'jc/fsck' 2007-03-10 23:10:26 -08:00
builtin-gc.c Make gc a builtin. 2007-03-17 00:34:19 -07:00
builtin-grep.c git-grep: don't use sscanf 2007-03-14 01:37:50 -07:00
builtin-init-db.c
builtin-log.c Replace remaining instances of strdup with xstrdup. 2007-03-19 18:16:03 -07:00
builtin-ls-files.c
builtin-ls-tree.c
builtin-mailinfo.c restrict the patch filtering 2007-03-12 23:33:41 -07:00
builtin-mailsplit.c
builtin-merge-base.c
builtin-merge-file.c
builtin-mv.c
builtin-name-rev.c
builtin-pack-objects.c [PATCH] clean up pack index handling a bit 2007-03-16 21:27:36 -07:00
builtin-pack-refs.c
builtin-prune-packed.c
builtin-prune.c
builtin-push.c Use RUN_GIT_CMD to run push backends 2007-03-12 23:40:18 -07:00
builtin-read-tree.c
builtin-reflog.c
builtin-rerere.c
builtin-rev-list.c
builtin-rev-parse.c
builtin-revert.c Correct new compiler warnings in builtin-revert 2007-03-12 23:40:18 -07:00
builtin-rm.c
builtin-runstatus.c
builtin-shortlog.c shortlog: prompt when reading from terminal by mistake 2007-03-14 01:33:41 -07:00
builtin-show-branch.c General const correctness fixes 2007-03-07 10:47:10 -08:00
builtin-show-ref.c
builtin-stripspace.c
builtin-symbolic-ref.c
builtin-tar-tree.c
builtin-unpack-objects.c
builtin-update-index.c Add core.symlinks to mark filesystems that do not support symbolic links. 2007-03-02 16:58:05 -08:00
builtin-update-ref.c
builtin-upload-archive.c
builtin-verify-pack.c
builtin-write-tree.c
builtin.h Make gc a builtin. 2007-03-17 00:34:19 -07:00
cache-tree.c
cache-tree.h
cache.h index-pack: use hash_sha1_file() 2007-03-20 22:09:57 -07:00
check-builtins.sh
check-racy.c
color.c
color.h
combine-diff.c Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
commit.c Replace remaining instances of strdup with xstrdup. 2007-03-19 18:16:03 -07:00
commit.h
config.c Limit the size of the new delta_base_cache 2007-03-18 22:43:37 -07:00
config.mak.in
configure.ac
connect.c Use run_command for proxy connections 2007-03-12 23:40:18 -07:00
convert-objects.c General const correctness fixes 2007-03-07 10:47:10 -08:00
convert.c
copy.c
COPYING
csum-file.c
csum-file.h
ctype.c
daemon.c
date.c
delta.h
diff-delta.c
diff-lib.c Teach --quiet to diff backends. 2007-03-14 16:21:19 -07:00
diff.c diff --quiet 2007-03-14 16:21:19 -07:00
diff.h diff --quiet 2007-03-14 16:21:19 -07:00
diffcore-break.c Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
diffcore-delta.c
diffcore-order.c Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
diffcore-pickaxe.c
diffcore-rename.c Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
diffcore.h
dir.c Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
dir.h
dump-cache-tree.c
entry.c Add core.symlinks to mark filesystems that do not support symbolic links. 2007-03-02 16:58:05 -08:00
environment.c Limit the size of the new delta_base_cache 2007-03-18 22:43:37 -07:00
exec_cmd.c
exec_cmd.h
fast-import.c Remove unnecessary casts from fast-import 2007-03-12 15:48:37 -04:00
fetch-pack.c Merge branch 'js/fetch-progress' (early part) 2007-03-04 17:31:21 -08:00
fetch.c
fetch.h
generate-cmdlist.sh
git-add--interactive.perl
git-am.sh builtin-mailinfo.c infrastrcture changes 2007-03-12 23:33:41 -07:00
git-applymbox.sh applymbox: brown paper bag fix. 2007-03-16 21:22:05 -07:00
git-applypatch.sh
git-archimport.perl git-archimport: allow remapping branch names 2007-03-07 10:30:22 -08:00
git-bisect.sh
git-checkout.sh git-fetch, git-branch: Support local --track via a special remote '.' 2007-03-16 02:10:12 -07:00
git-clean.sh
git-clone.sh make git clone -q suppress the noise with http fetch 2007-03-19 23:46:30 -07:00
git-commit.sh git-commit: add a --interactive option 2007-03-09 00:05:23 -08:00
git-compat-util.h Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
git-cvsexportcommit.perl
git-cvsimport.perl
git-cvsserver.perl cvsserver: further improve messages on commit and status 2007-03-14 02:09:33 -07:00
git-fetch.sh git-fetch: Fix single_force in append_fetch_head 2007-03-20 01:52:11 -07:00
git-instaweb.sh
git-lost-found.sh
git-ls-remote.sh
git-merge-octopus.sh
git-merge-one-file.sh
git-merge-ours.sh
git-merge-resolve.sh
git-merge-stupid.sh
git-merge.sh git-merge: finish when git-read-tree fails 2007-03-16 04:34:17 -07:00
git-mergetool.sh mergetool: print an appropriate warning if merge.tool is unknown 2007-03-18 22:30:10 -04:00
git-p4import.py
git-parse-remote.sh git-fetch, git-branch: Support local --track via a special remote '.' 2007-03-16 02:10:12 -07:00
git-pull.sh
git-quiltimport.sh builtin-mailinfo.c infrastrcture changes 2007-03-12 23:33:41 -07:00
git-rebase.sh
git-relink.perl
git-remote.perl
git-repack.sh
git-request-pull.sh
git-reset.sh
git-send-email.perl Make git-send-email aware of Cc: lines. 2007-03-18 21:10:03 -07:00
git-sh-setup.sh
git-svn.perl git-svn: add -l/--local command to "git svn rebase" 2007-03-13 21:18:37 -07:00
git-svnimport.perl
git-tag.sh
git-verify-tag.sh
GIT-VERSION-GEN GIT 1.5.1-rc1 2007-03-19 02:56:29 -07:00
git.c Make gc a builtin. 2007-03-17 00:34:19 -07:00
git.spec.in
gitk [PATCH] gitk: bind <F5> key to Update (reread commits) 2007-03-12 20:13:02 +11:00
grep.c
grep.h
hash-object.c
help.c
http-fetch.c
http-push.c
http.c
http.h
ident.c
imap-send.c
index-pack.c index-pack: more validation checks and cleanups 2007-03-20 22:09:59 -07:00
INSTALL
interpolate.c General const correctness fixes 2007-03-07 10:47:10 -08:00
interpolate.h General const correctness fixes 2007-03-07 10:47:10 -08:00
list-objects.c
list-objects.h
local-fetch.c [PATCH] local-fetch.c: some error printing cleanup 2007-03-16 21:27:35 -07:00
lockfile.c
log-tree.c format-patch --attach: not folding some long headers. 2007-03-04 17:31:29 -08:00
log-tree.h
Makefile Make gc a builtin. 2007-03-17 00:34:19 -07:00
merge-file.c
merge-index.c Fix merge-index 2007-03-19 02:48:37 -07:00
merge-recursive.c Handle core.symlinks=false case in merge-recursive. 2007-03-03 18:59:41 -08:00
merge-tree.c
mktag.c
mktree.c
object-refs.c
object.c Don't ever return corrupt objects from "parse_object()" 2007-03-20 22:17:17 -07:00
object.h
pack-check.c [PATCH] clean up pack index handling a bit 2007-03-16 21:27:36 -07:00
pack-redundant.c [PATCH] clean up pack index handling a bit 2007-03-16 21:27:36 -07:00
pack.h [PATCH] clean up pack index handling a bit 2007-03-16 21:27:36 -07:00
pager.c
patch-delta.c
patch-id.c
path-list.c
path-list.h
path.c General const correctness fixes 2007-03-07 10:47:10 -08:00
peek-remote.c
pkt-line.c
pkt-line.h
quote.c
quote.h
reachable.c
reachable.h
read-cache.c Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
README
receive-pack.c Use run_command within receive-pack to invoke index-pack 2007-03-12 23:40:18 -07:00
reflog-walk.c
reflog-walk.h
refs.c Merge branch 'maint' 2007-03-10 22:07:26 -08:00
refs.h
RelNotes GIT 1.5.0.5 2007-03-18 14:43:29 -07:00
revision.c Replace remaining instances of strdup with xstrdup. 2007-03-19 18:16:03 -07:00
revision.h Merge branch 'jc/boundary' 2007-03-11 23:02:52 -07:00
rsh.c
rsh.h
run-command.c Teach run-command to redirect stdout to /dev/null 2007-03-12 23:40:17 -07:00
run-command.h Teach run-command to redirect stdout to /dev/null 2007-03-12 23:40:17 -07:00
send-pack.c Use run_command within send-pack 2007-03-12 23:40:18 -07:00
server-info.c
setup.c Merge branch 'maint' 2007-03-10 22:07:26 -08:00
sha1_file.c Be more careful about zlib return values 2007-03-20 22:17:32 -07:00
sha1_name.c Re-fix get_sha1_oneline() 2007-03-12 11:30:38 -07:00
shallow.c
shell.c
show-index.c
sideband.c
sideband.h
ssh-fetch.c
ssh-pull.c
ssh-push.c
ssh-upload.c
strbuf.c
strbuf.h
tag.c
tag.h
tar.h
test-chmtime.c
test-date.c
test-delta.c
test-sha1.c
test-sha1.sh
trace.c git-branch, git-checkout: autosetup for remote branch tracking 2007-03-10 23:41:58 -08:00
tree-diff.c Set up for better tree diff optimizations 2007-03-19 02:01:39 -07:00
tree-walk.c Avoid unnecessary strlen() calls 2007-03-18 15:36:59 -07:00
tree-walk.h Avoid unnecessary strlen() calls 2007-03-18 15:36:59 -07:00
tree.c Trivial cleanup of track_tree_refs() 2007-03-19 01:48:56 -07:00
tree.h
unpack-file.c
unpack-trees.c
unpack-trees.h
update-server-info.c
upload-pack.c Merge branch 'js/fetch-progress' (early part) 2007-03-04 17:31:21 -08:00
usage.c
utf8.c Merge branch 'maint' 2007-03-03 19:47:46 -08:00
utf8.h
var.c
write_or_die.c
wt-status.c
wt-status.h
xdiff-interface.c Cast 64 bit off_t to 32 bit size_t 2007-03-07 11:15:26 -08:00
xdiff-interface.h

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

	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/tutorial.txt to get started, then see
Documentation/everyday.txt for a useful minimum set of commands,
and "man git-commandname" for documentation of each command.
CVS users may also want to read Documentation/cvs-migration.txt.

Many Git online resources are accessible from http://git.or.cz/
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.