Go to file
Linus Torvalds 213152688c process_{tree,blob}: Remove useless xstrdup calls
On Wed, 8 Apr 2009, Björn Steinbrink wrote:
>
> The name of the processed object was duplicated for passing it to
> add_object(), but that already calls path_name, which allocates a new
> string anyway. So the memory allocated by the xstrdup calls just went
> nowhere, leaking memory.

Ack, ack.

There's another easy 5% or so for the built-in object walker: once we've
created the hash from the name, the name isn't interesting any more, and
so something trivial like this can help a bit.

Does it matter? Probably not on its own. But a few more memory saving
tricks and it might all make a difference.

		Linus

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-12 14:30:31 -07:00
Documentation Documentation: clarify .gitattributes search 2009-04-07 21:58:25 -07:00
arm
compat compat/mingw.c: Teach mingw_rename() to replace read-only files 2008-11-23 19:26:42 -08:00
contrib Fix bash completion in path with spaces 2009-03-30 09:07:03 -07:00
git-gui Merge branch 'maint' of git://repo.or.cz/git-gui into maint 2008-11-01 22:31:14 -07:00
gitk-git
gitweb GIT 1.6.0.6 2008-12-19 19:27:35 -08:00
mozilla-sha1
perl Git.pm: call Error::Simple() properly 2009-01-13 22:52:35 -08:00
ppc
t Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.0 2009-03-12 21:48:43 -07:00
templates
xdiff xdiff: give up scanning similar lines early 2008-12-02 23:45:37 -08:00
.gitattributes
.gitignore
.mailmap
COPYING
GIT-VERSION-GEN
INSTALL
Makefile add test-dump-cache-tree in Makefile 2009-02-03 22:11:44 -08:00
README README: tutorial.txt is now called gittutorial.txt 2009-01-06 22:12:07 -08:00
RelNotes GIT 1.6.0.6 2008-12-19 19:27:35 -08:00
abspath.c
alias.c
alloc.c
archive-tar.c
archive-zip.c
archive.c git-archive: work in bare repos 2008-10-26 16:19:59 -07:00
archive.h
attr.c
attr.h
base85.c
blob.c
blob.h
branch.c Fix "checkout --track -b newbranch" on detached HEAD 2008-10-17 14:35:06 -07:00
branch.h
builtin-add.c
builtin-annotate.c
builtin-apply.c apply: fix access to an uninitialized mode variable, found by valgrind 2009-02-03 22:04:31 -08:00
builtin-archive.c git-archive: work in bare repos 2008-10-26 16:19:59 -07:00
builtin-blame.c builtin-blame: Fix blame -C -C with submodules. 2008-10-05 23:49:55 -07:00
builtin-branch.c Fix git branch -m for symrefs. 2008-10-26 14:42:57 -07:00
builtin-bundle.c
builtin-cat-file.c
builtin-check-attr.c
builtin-check-ref-format.c
builtin-checkout-index.c
builtin-checkout.c git checkout: don't warn about unborn branch if -f is already passed 2008-11-27 18:35:28 -08:00
builtin-clean.c
builtin-clone.c
builtin-commit-tree.c
builtin-commit.c commit: abort commit if interactive add failed 2009-04-05 00:37:32 -07:00
builtin-config.c Use git_pathdup instead of xstrdup(git_path(...)) 2008-10-30 17:52:24 -07:00
builtin-count-objects.c
builtin-describe.c
builtin-diff-files.c
builtin-diff-index.c
builtin-diff-tree.c
builtin-diff.c "git diff <tree>{3,}": do not reverse order of arguments 2008-12-07 14:57:57 -08:00
builtin-fast-export.c fast-export: ensure we traverse commits in topological order 2009-02-11 18:30:17 -08:00
builtin-fetch--tool.c
builtin-fetch-pack.c fetch-pack: Avoid memcpy() with src==dst 2008-12-07 02:41:45 -08:00
builtin-fetch.c Fix fetch/pull when run without --update-head-ok 2008-10-13 10:46:03 -07:00
builtin-fmt-merge-msg.c
builtin-for-each-ref.c Use strchrnul() instead of strchr() plus manual workaround 2008-09-29 08:56:26 -07:00
builtin-fsck.c builtin-fsck: fix off by one head count 2009-01-17 22:37:41 -08:00
builtin-gc.c builtin-gc.c: use new pack_keep bitfield to detect .keep file existence 2008-11-12 10:28:14 -08:00
builtin-grep.c grep: pass -I (ignore binary) down to external grep 2009-02-02 10:58:20 -08:00
builtin-http-fetch.c
builtin-init-db.c git init: --bare/--shared overrides system/global config 2008-10-08 07:18:44 -07:00
builtin-log.c git-show: do not segfault when showing a bad tag 2008-12-15 01:29:44 -08:00
builtin-ls-files.c Teach ls-files --with-tree=<tree> to work with options other than -c 2008-11-16 00:15:50 -08:00
builtin-ls-remote.c git ls-remote: make usage string match manpage 2008-11-11 13:24:00 -08:00
builtin-ls-tree.c
builtin-mailinfo.c mailinfo: 'From:' header should be unfold as well 2009-01-12 15:22:11 -08:00
builtin-mailsplit.c
builtin-merge-base.c
builtin-merge-file.c
builtin-merge-ours.c
builtin-merge-recursive.c Use remove_path from dir.c instead of own implementation 2008-09-29 08:37:07 -07:00
builtin-merge.c builtin-merge.c: allocate correct amount of memory 2008-10-09 08:13:29 -07:00
builtin-mv.c builtin-mv.c: check for unversionned files before looking at the destination. 2009-02-04 11:07:42 -08:00
builtin-name-rev.c
builtin-pack-objects.c process_{tree,blob}: Remove useless xstrdup calls 2009-04-12 14:30:31 -07:00
builtin-pack-refs.c
builtin-prune-packed.c
builtin-prune.c builtin-prune.c: prune temporary packs in <object_dir>/pack directory 2008-09-23 01:53:07 -07:00
builtin-push.c git-push.txt: Describe --repo option in more detail 2008-10-08 07:15:53 -07:00
builtin-read-tree.c checkout: Fix "initial checkout" detection 2008-11-12 14:16:50 -08:00
builtin-reflog.c Use git_pathdup instead of xstrdup(git_path(...)) 2008-10-30 17:52:24 -07:00
builtin-remote.c Fix non-literal format in printf-style calls 2008-11-11 14:43:59 -08:00
builtin-rerere.c
builtin-reset.c Fix git branch -m for symrefs. 2008-10-26 14:42:57 -07:00
builtin-rev-list.c
builtin-rev-parse.c
builtin-revert.c Merge branch 'ar/maint-mksnpath' into maint 2008-11-08 16:13:19 -08:00
builtin-rm.c git rm: refresh index before up-to-date check 2008-10-08 07:04:44 -07:00
builtin-send-pack.c Merge branch 'cb/maint-update-ref-fix' into maint 2008-11-08 17:32:49 -08:00
builtin-shortlog.c
builtin-show-branch.c
builtin-show-ref.c
builtin-stripspace.c
builtin-symbolic-ref.c
builtin-tag.c tag: delete TAG_EDITMSG only on successful tag 2008-12-07 02:53:45 -08:00
builtin-tar-tree.c
builtin-unpack-objects.c
builtin-update-index.c
builtin-update-ref.c Fix git update-ref --no-deref -d. 2008-10-26 14:44:25 -07:00
builtin-upload-archive.c
builtin-verify-pack.c
builtin-verify-tag.c
builtin-write-tree.c
builtin.h
bundle.c Fix non-literal format in printf-style calls 2008-11-11 14:43:59 -08:00
bundle.h
cache-tree.c
cache-tree.h
cache.h Clear the delta base cache during fast-import checkpoint 2009-02-10 15:30:59 -08:00
check-builtins.sh
check-racy.c
check_bindir
color.c
color.h
combine-diff.c
command-list.txt
commit.c
commit.h
config.c Use git_pathdup instead of xstrdup(git_path(...)) 2008-10-30 17:52:24 -07:00
config.mak.in
configure.ac
connect.c
convert.c
copy.c
csum-file.c fix pread()'s short read in index-pack 2008-10-10 07:09:30 -07:00
csum-file.h fix pread()'s short read in index-pack 2008-10-10 07:09:30 -07:00
ctype.c
daemon.c
date.c date/time: do not get confused by fractional seconds 2008-11-13 09:06:58 -08:00
decorate.c
decorate.h
delta.h
diff-delta.c
diff-lib.c
diff-no-index.c
diff.c diff.c: output correct index lines for a split diff 2009-01-27 00:48:00 -08:00
diff.h
diffcore-break.c
diffcore-delta.c
diffcore-order.c
diffcore-pickaxe.c
diffcore-rename.c Add file delete/create info when we overflow rename_limit 2008-10-28 08:58:42 -07:00
diffcore.h Add reference for status letters in documentation. 2008-11-02 15:57:10 -08:00
dir.c Support "\" in non-wildcard exclusion entries 2009-02-12 11:36:43 -08:00
dir.h Add remove_path: a function to remove as much as possible of a path 2008-09-29 08:37:07 -07:00
editor.c
entry.c
environment.c Fix non-literal format in printf-style calls 2008-11-11 14:43:59 -08:00
exec_cmd.c
exec_cmd.h
fast-import.c Clear the delta base cache during fast-import checkpoint 2009-02-10 15:30:59 -08:00
fetch-pack.h
fixup-builtins
fsck.c Fix non-literal format in printf-style calls 2008-11-11 14:43:59 -08:00
fsck.h
generate-cmdlist.sh generate-cmdlist.sh: avoid selecting synopsis at wrong place 2008-11-30 18:16:32 -08:00
git-add--interactive.perl add -p: warn if only binary changes present 2008-10-26 16:20:24 -07:00
git-am.sh
git-archimport.perl
git-bisect.sh bisect: fix another instance of eval'ed string 2009-02-27 14:30:34 -08:00
git-compat-util.h
git-cvsexportcommit.perl
git-cvsimport.perl
git-cvsserver.perl
git-filter-branch.sh
git-instaweb.sh
git-lost-found.sh
git-merge-octopus.sh
git-merge-one-file.sh
git-merge-resolve.sh
git-mergetool.sh git-mergetool: properly handle "git mergetool -- filename" 2008-12-19 19:10:58 -08:00
git-parse-remote.sh
git-pull.sh pull: allow "git pull origin $something:$current_branch" into an unborn branch 2008-10-17 11:26:20 -07:00
git-quiltimport.sh
git-rebase--interactive.sh Avoid spurious error messages on error mistakes. 2009-01-13 00:21:31 -08:00
git-rebase.sh Teach rebase -i to honor pre-rebase hook 2008-10-06 01:19:14 -07:00
git-relink.perl
git-repack.sh git-repack: use non-dashed update-server-info 2009-04-05 00:08:49 -07:00
git-request-pull.sh request-pull: make usage string match manpage 2008-11-17 02:27:18 -08:00
git-send-email.perl git-send-email: handle email address with quoted comma 2008-12-19 19:10:48 -08:00
git-sh-setup.sh
git-stash.sh git-stash.sh: fix flawed fix of invalid ref handling (commit da65e7c1) 2008-10-09 09:09:50 -07:00
git-submodule.sh git-submodule: Avoid printing a spurious message. 2008-11-11 13:48:04 -08:00
git-svn.perl git-svn: Make following parents atomic 2008-12-08 16:29:34 -08:00
git-web--browse.sh
git.c maint: check return of split_cmdline to avoid bad config strings 2008-09-24 08:58:14 -07:00
git.spec.in Fixed broken git help -w when installing from RPM 2009-02-04 22:00:49 -08:00
graph.c
graph.h
grep.c Fix non-literal format in printf-style calls 2008-11-11 14:43:59 -08:00
grep.h
hash-object.c
hash.c
hash.h
help.c
http-push.c
http-walker.c
http.c http.c: use 'git_config_string' to get 'curl_http_proxy' 2008-12-07 02:41:55 -08:00
http.h
ident.c
imap-send.c
index-pack.c rehabilitate 'git index-pack' inside the object store 2008-10-21 13:20:03 -07:00
interpolate.c
interpolate.h
list-objects.c process_{tree,blob}: Remove useless xstrdup calls 2009-04-08 22:58:43 -07:00
list-objects.h
ll-merge.c
ll-merge.h
lockfile.c Enhance hold_lock_file_for_{update,append}() API 2008-10-19 12:35:37 -07:00
log-tree.c
log-tree.h
mailmap.c
mailmap.h
match-trees.c
merge-file.c
merge-index.c
merge-recursive.h
merge-tree.c
mktag.c
mktree.c
name-hash.c
object.c
object.h
pack-check.c
pack-redundant.c
pack-refs.c Enhance hold_lock_file_for_{update,append}() API 2008-10-19 12:35:37 -07:00
pack-refs.h
pack-revindex.c
pack-revindex.h
pack-write.c Do not perform cross-directory renames when creating packs 2008-09-22 12:19:14 -07:00
pack.h
pager.c pager: do not dup2 stderr if it is already redirected 2008-12-15 01:37:15 -08:00
parse-options.c
parse-options.h
patch-delta.c
patch-id.c
patch-ids.c
patch-ids.h
path.c Fix non-literal format in printf-style calls 2008-11-11 14:43:59 -08:00
pkt-line.c
pkt-line.h
pretty.c
progress.c
progress.h
quote.c
quote.h
reachable.c process_{tree,blob}: Remove useless xstrdup calls 2009-04-08 22:58:43 -07:00
reachable.h
read-cache.c checkout: Fix "initial checkout" detection 2008-11-12 14:16:50 -08:00
receive-pack.c Fix git branch -m for symrefs. 2008-10-26 14:42:57 -07:00
reflog-walk.c
reflog-walk.h
refs.c Fix non-literal format in printf-style calls 2008-11-11 14:43:59 -08:00
refs.h
remote.c git push: Interpret $GIT_DIR/branches in a Cogito compatible way 2008-11-11 15:26:40 -08:00
remote.h
rerere.c Merge branch 'ar/maint-mksnpath' into maint 2008-11-08 16:13:19 -08:00
rerere.h
revision.c revision.c: use proper data type in call to sizeof() within xrealloc 2008-11-14 21:41:19 -08:00
revision.h
run-command.c
run-command.h
send-pack.h
server-info.c Use git_pathdup instead of xstrdup(git_path(...)) 2008-10-30 17:52:24 -07:00
setup.c make prefix_path() never return NULL 2008-10-06 00:37:30 -07:00
sha1-lookup.c
sha1-lookup.h
sha1_file.c close_sha1_file(): make it easier to diagnose errors 2009-03-24 14:39:20 -07:00
sha1_name.c get_sha1_basic(): fix invalid memory access, found by valgrind 2009-01-27 15:16:31 -08:00
shallow.c
shell.c
shortlog.h
show-index.c
sideband.c
sideband.h
strbuf.c
strbuf.h
string-list.c
string-list.h
symlinks.c
tag.c
tag.h
tar.h
test-chmtime.c Add --verbose|-v to test-chmtime 2008-10-31 00:19:52 -07:00
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-match-trees.c
test-parse-options.c
test-path-utils.c test-path-utils: Fix off by one, found by valgrind 2009-01-27 15:16:41 -08:00
test-sha1.c
test-sha1.sh
thread-utils.c
thread-utils.h
trace.c
transport.c Fix fetch/clone --quiet when stdout is connected 2008-10-06 00:01:07 -07:00
transport.h
tree-diff.c
tree-walk.c
tree-walk.h
tree.c
tree.h
unpack-file.c
unpack-trees.c merge: fix out-of-bounds memory access 2009-01-31 10:39:55 -08:00
unpack-trees.h
update-server-info.c
upload-pack.c
usage.c
utf8.c
utf8.h
var.c
walker.c
walker.h
wrapper.c
write_or_die.c
ws.c
wt-status.c refactor handling of "other" files in ls-files and status 2008-10-17 12:46:59 -07:00
wt-status.h
xdiff-interface.c xdiff-interface.c: strip newline (and cr) from line before pattern matching 2008-10-16 08:31:56 -07:00
xdiff-interface.h

README

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

	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 "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.

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.