summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2006-04-27Merge branch 'jc/count' into nextLibravatar Junio C Hamano5-4/+129
* jc/count: built-in count-objects. pack-objects: update size heuristucs. verify-pack: check integrity in a saner order.
2006-04-27built-in count-objects.Libravatar Junio C Hamano4-1/+126
Also it learned to do -v (verbose) to report: - number of loose objects - disk occupied by loose objects - number of objects in local packs - number of loose objects that are also in pack - unrecognised garbage in .git/objects/??/. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27pack-objects: update size heuristucs.Libravatar Junio C Hamano1-6/+6
We used to omit delta base candidates that is much bigger than the target, but delta size does not grow when we delete more, so that was not a very good heuristics. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27Merge branch 'np/delta' into nextLibravatar Junio C Hamano1-37/+41
* np/delta: use delta index data when finding best delta matches
2006-04-27Merge branch 'jc/cache-tree' into nextLibravatar Junio C Hamano4-18/+62
* jc/cache-tree: test-dump-cache-tree: validate the cached data as well. cache_tree_update: give an option to update cache-tree only.
2006-04-27test-dump-cache-tree: validate the cached data as well.Libravatar Junio C Hamano1-11/+45
While dumping the cached data, try recomputing everything from scratch to make sure things match. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27cache_tree_update: give an option to update cache-tree only.Libravatar Junio C Hamano3-7/+17
When the extra "dryrun" parameter is true, cache_tree_update() recomputes the invalid entry but does not actually creates new tree object. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27Merge branch 'fix'Libravatar Junio C Hamano1-3/+3
* fix: verify-pack: check integrity in a saner order.
2006-04-27verify-pack: check integrity in a saner order.Libravatar Junio C Hamano1-3/+3
Check internal integrity to report corrupt pack or idx, and then check cross-integrity between idx and pack. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27Merge branch 'jc/pathcheck' into nextLibravatar Junio C Hamano3-3/+36
* jc/pathcheck: revision parsing: make "rev -- paths" checks stronger.
2006-04-27Fix mismerged update-index from jc/cache-tree branch.Libravatar Junio C Hamano1-1/+0
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27Retire rabinpoly fingerprinting codeLibravatar Junio C Hamano7-521/+0
For now let's retire this and reintroduce it as part of the updated pack-objects series from Geert when it is ready. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27Merge branch 'master' into nextLibravatar Junio C Hamano3-2/+1
* master: Fix "git help -a" terminal autosizing diff-index: fix compilation warnings.
2006-04-27Merge branch 'pb/config'Libravatar Junio C Hamano4-13/+30
* pb/config: git-cvsserver: typofixes Deprecate usage of git-var -l for getting config vars list git-repo-config --list support
2006-04-27Merge branch 'jc/diffstat'Libravatar Junio C Hamano1-4/+14
* jc/diffstat: diff --stat: show complete rewrites consistently.
2006-04-27Fix "git help -a" terminal autosizingLibravatar Linus Torvalds2-1/+1
When I split out the builtin commands into their own files, I left the include of <sys/ioctl.h> in git.c rather than moving it to the file that needed it (builtin-help.c). Nobody seems to have noticed, because everything still worked, but because the TIOCGWINSZ macro was now no longer defined when compiling the "term_columns()" function, it would no longer automatically notice the terminal size unless your system used the ancient "COLUMNS" environment variable approach. Trivially fixed by just moving the header include to the file that actually needs it. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27diff-index: fix compilation warnings.Libravatar Junio C Hamano1-1/+0
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27Merge branch 'jc/cache-tree' into nextLibravatar Junio C Hamano3-7/+67
* jc/cache-tree: read-tree: teach 1-way merege and plain read to prime cache-tree. read-tree: teach 1 and 2 way merges about cache-tree. update-index: when --unresolve, smudge the relevant cache-tree entries.
2006-04-27read-tree: teach 1-way merege and plain read to prime cache-tree.Libravatar Junio C Hamano3-3/+54
This teaches read-tree to fully populate valid cache-tree when reading a tree from scratch, or reading a single tree into an existing index, reusing only the cached stat information (i.e. one-way merge). We have already taught update-index about cache-tree, so "git checkout" followed by updates to a few path followed by a "git commit" would become very efficient. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27read-tree: teach 1 and 2 way merges about cache-tree.Libravatar Junio C Hamano1-4/+13
This teaches one-way and two-way "read-tree -m" (and its special form, "read-tree --reset" as well) not to discard cache-tree but invalidate only the changed parts of the tree. When switching between related branches, this helps the eventual commit (i.e. write-tree) by keeping cache-tree valid as much as possible. This does not prime cache-tree yet, but we ought to be able to do that for no-merge (i.e. reading from a tree object) case and, and also perhaps 1 way merge case. With this patch applied, switching between the tip of Linux 2.6 kernel tree and a branch that touches one path (fs/ext3/Makefile) from it invalidates only 3 paths out of 1201 cache-tree entries in the index, and subsequent write-tree takes about a half as much time as before. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26update-index: when --unresolve, smudge the relevant cache-tree entries.Libravatar Junio C Hamano1-0/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26use delta index data when finding best delta matchesLibravatar Nicolas Pitre1-37/+41
This patch allows for computing the delta index for each base object only once and reuse it when trying to find the best delta match. This should set the mark and pave the way for possibly better delta generator algorithms. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26Merge branch 'jc/cache-tree' into nextLibravatar Junio C Hamano1-0/+28
* jc/cache-tree: t0000-basic: more commit-tree tests.
2006-04-26Merge branch 'master' into jc/cache-treeLibravatar Junio C Hamano7-25/+63
* master: t0000-basic: more commit-tree tests. commit-tree.c: check_valid() microoptimization. Fix filename verification when in a subdirectory rebase: typofix. socksetup: don't return on set_reuse_addr() error
2006-04-26t0000-basic: more commit-tree tests.Libravatar Junio C Hamano1-0/+28
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26Merge branch 'se/rebase' into nextLibravatar Junio C Hamano2-37/+101
* se/rebase: Add --continue and --abort options to git-rebase.
2006-04-26Merge branch 'nh/fetch-http' into nextLibravatar Junio C Hamano7-29/+47
* nh/fetch-http: git-fetch: resolve remote symrefs for HTTP transport commit-tree.c: check_valid() microoptimization. Fix filename verification when in a subdirectory rebase: typofix. socksetup: don't return on set_reuse_addr() error
2006-04-26git-fetch: resolve remote symrefs for HTTP transportLibravatar Nick Hengeveld1-4/+12
git-fetch validates that a remote ref resolves to a SHA1 prior to calling git-http-fetch. This adds support for resolving a few levels of symrefs to get to the SHA1. Signed-off-by: Nick Hengeveld <nickh@reactrix.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26Add --continue and --abort options to git-rebase.Libravatar sean2-37/+101
git rebase [--onto <newbase>] <upstream> [<branch>] git rebase --continue git rebase --abort Add "--continue" to restart the rebase process after manually resolving conflicts. The user is warned if there are still differences between the index and the working files. Add "--abort" to restore the original branch, and remove the .dotest working files. Some minor additions to the git-rebase documentation. [jc: fix that applies to the maintenance track has been dealt with separately.] Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26revision parsing: make "rev -- paths" checks stronger.Libravatar Junio C Hamano3-3/+36
If you don't have a "--" marker, then: - all of the arguments we are going to assume are pathspecs must exist in the working tree. - none of the arguments we parsed as revisions could be interpreted as a filename. so that there really isn't any possibility of confusion in case somebody does have a revision that looks like a pathname too. The former rule has been in effect; this implements the latter. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26Merge branch 'fix'Libravatar Junio C Hamano6-25/+35
* fix: commit-tree.c: check_valid() microoptimization. Fix filename verification when in a subdirectory rebase: typofix. socksetup: don't return on set_reuse_addr() error
2006-04-26commit-tree.c: check_valid() microoptimization.Libravatar Junio C Hamano1-6/+5
There is no point reading the whole object just to make sure it exists and it is of the expected type. We added sha1_object_info() for such need after this code was written, so use it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26Fix filename verification when in a subdirectoryLibravatar Linus Torvalds4-18/+29
When we are in a subdirectory of a git archive, we need to take the prefix of that subdirectory into accoung when we verify filename arguments. Noted by Matthias Lederhofer This also uses the improved error reporting for all the other git commands that use the revision parsing interfaces, not just git-rev-parse. Also, it makes the error reporting for mixed filenames and argument flags clearer (you cannot put flags after the start of the pathname list). [jc: with fix to a trivial typo noticed by Timo Hirvonen] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26rebase: typofix.Libravatar Junio C Hamano1-1/+1
Noticed by Sean. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26Merge branch 'jc/cache-tree' into nextLibravatar Junio C Hamano4-2/+24
* jc/cache-tree: commit-tree: allow generic object name for the tree as well. Makefile: remove and create xdiff library from scratch. t0000-basic: Add ls-tree recursive test back.
2006-04-26Merge branch 'master' into jc/cache-treeLibravatar Junio C Hamano22-2183/+2693
* master: commit-tree: allow generic object name for the tree as well. Makefile: remove and create xdiff library from scratch. t0000-basic: Add ls-tree recursive test back. Libified diff-index: backward compatibility fix. Libify diff-index. Libify diff-files. Makefile: remove and create libgit.a from scratch. Document the configuration file Document git-var -l listing also configuration variables rev-parse: better error message for ambiguous arguments make update-index --chmod work with multiple files and --stdin socksetup: don't return on set_reuse_addr() error Fix "git show --stat" git-update-index --unresolve Add git-unresolve <paths>... Add colordiff for git to contrib/colordiff. gitk: Let git-rev-list do the argument list parsing
2006-04-26commit-tree: allow generic object name for the tree as well.Libravatar Junio C Hamano1-1/+1
We use get_sha1() for -p (parent) objects, but still used get_sha1_hex() for the tree. Just to be consistent, allow extended SHA1 expression for the tree object name. Note that this is not to encourage funky things like this: git-commit-tree HEAD^{tree} -p HEAD Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26Makefile: remove and create xdiff library from scratch.Libravatar Junio C Hamano1-1/+1
... in the same spirit as 71459c193d04870076efa0a387c317390b53e3e2. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26t0000-basic: Add ls-tree recursive test back.Libravatar Junio C Hamano1-0/+21
When we updated ls-tree recursive output to omit the tree nodes, 246cc52f388cae8ca99e5a12b8458c9bfa467765 adjusted the old test so that we do not expect to see trees in its output. Later, with 0f8f45cb4a7e664b396f73c25891da46b953b8b8, we added back the ability to show both with -t option, but we forgot to update the test as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-26Merge branch 'pb/config' into nextLibravatar Junio C Hamano1-8/+8
* pb/config: git-cvsserver: typofixes
2006-04-25git-cvsserver: typofixesLibravatar Junio C Hamano1-8/+8
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-25Merge branch 'jc/diffstat' into nextLibravatar Junio C Hamano2-5/+15
* jc/diffstat: diff --stat: show complete rewrites consistently. Makefile: remove and create libgit.a from scratch.
2006-04-25diff --stat: show complete rewrites consistently.Libravatar Junio C Hamano1-4/+14
The patch format shows complete rewrite as deletion of all old lines followed by addition of all new lines. Count lines consistenly with that when doing diffstat. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-25Merge branch 'jc/diff'Libravatar Junio C Hamano9-2136/+2111
* jc/diff: Libified diff-index: backward compatibility fix. Libify diff-index. Libify diff-files.
2006-04-25Makefile: remove and create libgit.a from scratch.Libravatar Junio C Hamano1-1/+1
Foolishly I renamed diff.o around which caused an old diff.o taken out of libgit.a and got linked into resulting binary and exhibited mysterious breakage for many people. This borrows from the kernel Makefile (scripts/Makefile.build) to first remove the target and then recreate. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-25Merge branch 'jc/cache-tree' into nextLibravatar Junio C Hamano3-29/+88
* jc/cache-tree: test-dump-cache-tree: report number of subtrees. cache-tree: sort the subtree entries. Teach fsck-objects about cache-tree.
2006-04-25test-dump-cache-tree: report number of subtrees.Libravatar Junio C Hamano1-3/+4
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-25cache-tree: sort the subtree entries.Libravatar Junio C Hamano1-26/+66
Not that this makes practical performance difference; the kernel tree for example has 200 or so directories that have subdirectory, and the largest ones have 57 of them (fs and drivers). With a test to apply 600 patches with git-apply and git-write-tree, this did not make more than one per-cent of a difference, but it is a good cleanup. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-25Teach fsck-objects about cache-tree.Libravatar Junio C Hamano1-0/+18
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-24socksetup: don't return on set_reuse_addr() errorLibravatar Serge E. Hallyn1-1/+1
The set_reuse_addr() error case was the only error case in socklist() where we returned rather than continued. Not sure why. Either we must free the socklist, or continue. This patch continues on error. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 0032d548db56eac9ea09b4ba05843365f6325b85 commit)