summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2005-07-03"git rev-list --unpacked" shows only unpacked commitsLibravatar Linus Torvalds1-0/+11
More infrastructure to do efficient incremental packs.
2005-07-03Add "--incremental" flag to git-pack-objectsLibravatar Linus Torvalds1-1/+9
It won't add an object that is already in a pack to the new pack.
2005-07-03Add "--all" flag to rev-parse that shows all refsLibravatar Linus Torvalds2-3/+14
And make git-rev-list just silently ignore non-commit refs if we're not asking for all objects.
2005-07-03Add "has_sha1_pack()" function to query whether the object is available in a ↵Libravatar Linus Torvalds2-0/+7
pack We'll want this for incremental packing.
2005-07-03Make git-fsck-cache check HEAD integrityLibravatar Linus Torvalds1-0/+26
In particular, check that it's a symlink, and points to refs/heads/. We depend on that these days not only for "git checkout", but also because fsck and others only check for references in the .git/refs/ subdirectory, not things like HEAD itself.
2005-07-03Fix sparse warnings.Libravatar Linus Torvalds9-18/+18
Mainly making a lot of local functions and variables be marked "static", but there was a "zero as NULL" warning in there too.
2005-07-03Fix up header file dependencies and add sparse checking rulesLibravatar Linus Torvalds1-1/+10
We're pretty sparse-clean already, thanks to earlier efforts, but some things inevitably creep in.
2005-07-03Fix up "for_each_ref()" to be more usable, and use it in git-fsck-cacheLibravatar Linus Torvalds4-63/+18
It needed to take the GIT_DIR information into account, something that the original receive-pack usage just never cared about.
2005-07-03Fix gcc warning in send-pack.cLibravatar Linus Torvalds1-0/+1
send_pack() was declared to return "int" (although nobody cared), but didn't actually return anything.
2005-07-03Avoid gcc warnings in sha1_file.cLibravatar Linus Torvalds1-4/+4
A couple of bogus "might be used undefined" warnings are avoided by moving the initializations unnecessarily early.
2005-07-02Generalize the "show each ref" code in receice-packLibravatar Linus Torvalds3-53/+77
This turns it into a generic "do xyz for each ref" library function.
2005-06-30[PATCH] Show more details of packfile with verify-pack -v.Libravatar Junio C Hamano3-1/+84
This implements show_pack_info() function used in verify-pack command when -v flag is used to obtain something like unpack-objects used to give when it was first written. It shows the following for each non-deltified object found in the pack: SHA1 type size offset For deltified objects, it shows this instead: SHA1 type size offset depth base_sha1 In order to get the output in the order that appear in the pack file for debugging purposes, you can do this: $ git-verify-pack -v packfile | sort -n -k 4,4 Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-30[PATCH] verify-pack updates.Libravatar Junio C Hamano7-44/+156
Nico pointed out that having verify_pack.c and verify-pack.c was confusing. Rename verify_pack.c to pack-check.c as suggested, and enhances the verification done quite a bit. - Built-in sha1_file unpacking knows that a base object of a deltified object _must_ be in the same pack, and takes advantage of that fact. - Earlier verify-pack command only checked the SHA1 sum for the entire pack file and did not look into its contents. It now checks everything idx file claims to have unpacks correctly. - It now has a hook to give more detailed information for objects contained in the pack under -v flag. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-30[PATCH] Avoid unnecessarily inflating and interpreting deltaLibravatar Junio C Hamano2-38/+44
This teaches packed_delta_info() that it only needs to look at the type of the base object to figure out both type and size of a deltified object. This saves quite a many calls to inflate() when dealing with a deep delta chain. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-30Do ref matching on the sender side rather than on receiverLibravatar Linus Torvalds2-39/+32
This makes the receiver always send a full list of valid refs, which will allow us to do better packs, as well as handle creation of new refs. Eventually. Right now we just moved the matching and enabled it. So now you can do git-send-pack host:path branch1 branch2 to only send branches "branch1" and "branch2".
2005-06-30Add support for "forcing" a ref on the remote sideLibravatar Linus Torvalds1-2/+18
A "old ref" of all zeroes is considered a "don't care" ref, and allows us to say "write the new ref regardless of what the old ref contained (or even if it existed at all)". This allows (if git-send-pack were to do it) creating new refs, and fixing up old ones.
2005-06-30git-send-pack: actually send the object packLibravatar Linus Torvalds1-12/+79
This concludes this lesson. I've actually successfully sent an update using the git-send-pack command. Probably tons of work still to do, and nasty debugging, but it's now actually potentially useful.
2005-06-30git-receive-pack: implement ref switch command handlingLibravatar Linus Torvalds1-5/+59
After unpacking the object pack successfully, we go through the list of refs, and verify that they still contain their expected values. Then we replace them with the new ones.
2005-06-29Add comment on what send-pack still needs to doLibravatar Linus Torvalds1-0/+11
Me tired.
2005-06-29git-receive-pack: start parsing ref update commandsLibravatar Linus Torvalds1-17/+35
We don't act on them yet, but we parse them.
2005-06-29Slow but steady progress on git pack receive/sendLibravatar Linus Torvalds2-27/+42
2005-06-29git-send-pack: start parsing local/remote reference differencesLibravatar Linus Torvalds1-3/+58
Right now it just shows which refs it picks up, and whether they are the same or changed on the remote end. Getting there..
2005-06-29Turn on optimization againLibravatar Linus Torvalds1-1/+1
It got turned off by mistake just because I had been doing debugging, and committed the Makefile that had other changes ...
2005-06-29[PATCH] Remove unnecessary sort from t6001 testcaseLibravatar Jon Seymour1-8/+8
This patch removes an unnecessary sort from the t6001 testcase. Sorts were previously necessary when testing non --merge-order cases because the output order wasn't entirely deterministic unless commit date was fixed. However, commit dates are now fixed, so the need for a sort has disappeared. So the sort has been removed. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29[PATCH] Fix broken t6001 test caseLibravatar Jon Seymour1-3/+3
This fix fixes a t/t6001 test case break that was hidden by a bug in the test case infrastructure. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29[PATCH] Demonstrate broken t6001 test case functionLibravatar Jon Seymour1-3/+2
Junio discovered a problem where an actual test case break was hidden because pipelines are not handled properly by the test infrastructure in t6001. This patch fixes the broken infrastructure (and demonstrates the break explicitly). A subsequent patch in this series will fix the test case so that it doesn't fail. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29[PATCH] Fix for git-rev-list --merge-order B ^A (A,B share common base) [rev 2]Libravatar Jon Seymour2-11/+9
This patch makes --merge-order produce the same list as git-rev-list without --merge-order specified. In particular, if the graph looks like this: A | B |/ C | D The both git-rev-list B ^A and git-rev-list --merge-order will produce B. The unit tests have been changed to reflect the fact that the prune points are now formally part of the start list that is used to perform the --merge-order sort. That is: git-rev-list --merge-order A ^D used to produce = A | C It now produces: ^ A | C Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29[PATCH] Test case that demonstrates problem with --merge-order ^ processingLibravatar Jon Seymour1-0/+5
Added a test case that shows that --merge-order doesn't produce the correct result in the following case. A | | B |/ C | D git-rev-list --merge-order A ^B should produce just A. Instead it produces BCD. A subsequent patch will fix this defect. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29Make send/receive-pack be closer to doing something interestingLibravatar Linus Torvalds5-126/+148
2005-06-29Start of "git-send-pack", the local part of sending off a packLibravatar Linus Torvalds2-1/+120
Like git-receive-pack, this is only partway done.
2005-06-29Add first cut at "git-receive-pack"Libravatar Linus Torvalds3-1/+326
It's not working yet, but it's at the point where I want to be able to track my changes. The theory of operation is that this is the "remote" side of a "git push". It can tell us what references the remote side has, receives out reference update commands and a pack-file, and can execute the unpacking command.
2005-06-29Remove bogus dup commit warning with --merge-orderLibravatar Linus Torvalds1-4/+1
It makes gitk unhappy, and besides, non-merge-order doesn't complain, so why do it here..
2005-06-29Teach git-rev-list about non-commit objectsLibravatar Linus Torvalds1-13/+91
Now you can give git-rev-list tags, trees and blobs, and it will do the proper reachability for them all. Knock wood. Of course, you need the "--objects" flag to do anything but plain commits.
2005-06-29Prepare git-rev-list for tracking tag objects tooLibravatar Linus Torvalds1-6/+20
We want to be able to just say "give a difference between these objects", rather than limiting it to commits only. This isn't there yet, but it sets things up to be a bit easier.
2005-06-29[PATCH] Adjust t5300 test for unpack-objects changeLibravatar Junio C Hamano1-2/+4
It now always read from standard input and rejects non-flag arguments. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29Re-instate dry-run logic in git-unpack-objectsLibravatar Linus Torvalds1-1/+6
It can no longer be as verbose, since it doesn't have a good way to resolve deltas (now that it is purely streaming, it cannot seek around to read the objects a delta is based on). But it can check that the thing unpacks cleanly at least as far as pack syntax goes - all the objects uncompress cleanly, and the pack has the right final SHA1.
2005-06-29Clean up git-unpack-objects a bitLibravatar Linus Torvalds1-13/+14
I'd like to add back the "dry-run" thing, but it turns out that to do it well, I'd have to keep all the object data in memory (which is not acceptable). So I'll clean it up a bit and make it do as many checks as it can.
2005-06-29[PATCH] Add git-verify-pack command.Libravatar Junio C Hamano10-18/+231
Given a list of <pack>.idx files, this command validates the index file and the corresponding .pack file for consistency. This patch also uses the same validation mechanism in fsck-cache when the --full flag is used. During normal operation, sha1_file.c verifies that a given .idx file matches the .pack file by comparing the SHA1 checksum stored in .idx file and .pack file as a minimum sanity check. We may further want to check the pack signature and version when we map the pack, but that would be a separate patch. Earlier, errors to map a pack file was not flagged fatal but led to a random fatal error later. This version explicitly die()s when such an error is detected. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29[PATCH] Fixlets on top of Nico's clean-up.Libravatar Junio C Hamano3-9/+6
If we prefer 0 as maxsize for diff_delta() to say "unlimited", let's be consistent about it. This patch also fixes type mismatch in a call to get_delta_hdr_size() from packed_delta_info(). Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29[PATCH] assorted delta code cleanupLibravatar Nicolas Pitre6-58/+35
This is a wrap-up patch including all the cleanups I've done to the delta code and its usage. The most important change is the factorization of the delta header handling code. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-28Fix packed_delta_info() that was broken by the delta header packing changeLibravatar Linus Torvalds1-20/+18
Pointed out by Junio.
2005-06-28Make git pack files use little-endian size encodingLibravatar Linus Torvalds5-31/+31
This makes it match the new delta encoding, and admittedly makes the code easier to follow. This also updates the PACK file version to 2, since this (and the delta encoding change in the previous commit) are incompatible with the old format.
2005-06-28[PATCH] denser delta header encodingLibravatar Nicolas Pitre3-46/+37
Since the delta data format is not tied to any actual git object anymore, now is the time to add a small improvement to the delta data header as it is been done for packed object header. This patch allows for reducing the delta header of about 2 bytes and makes for simpler code. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-28[PATCH] Emit base objects of a delta chain when the delta is output.Libravatar Junio C Hamano1-5/+20
Deltas are useless by themselves and when you use them you need to get to their base objects. A base object should inherit recency from the most recent deltified object that is based on it and that is what this patch teaches git-pack-objects. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-28git-unpack-objects: re-write to read from stdinLibravatar Linus Torvalds1-228/+190
It gets a bit more complicated to unpack in a streaming environment, but here it is. The rewrite is actually a lot cleaner in other ways, it's just a bit more subtle.
2005-06-28[PATCH] Use enhanced diff_delta() in the similarity estimator.Libravatar Junio C Hamano1-1/+6
The diff_delta() interface was extended to reject generating too big a delta while we were working on the packed GIT archive format. Take advantage of that when generating delta in the similarity estimator used in diffcore-rename.c Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-28[PATCH] Fix unpack-objects for header length information.Libravatar Junio C Hamano2-4/+4
Standalone unpack-objects command was not adjusted for header length encoding change when dealing with deltified entry. This fixes it. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-28Merge fighting fsck-cache updates from JunioLibravatar Linus Torvalds4-28/+103
It's just easier to let git help out with the merge than it is to try to fix up the diffs.
2005-06-28[PATCH] Update fsck-cache (take 2)Libravatar Junio C Hamano2-13/+76
The fsck-cache complains if objects referred to by files in .git/refs/ or objects stored in files under .git/objects/??/ are not found as stand-alone SHA1 files (i.e. found in alternate object pools GIT_ALTERNATE_OBJECT_DIRECTORIES or packed archives stored under .git/objects/pack). Although this is a good semantics to maintain consistency of a single .git/objects directory as a self contained set of objects, it sometimes is useful to consider it is OK as long as these "outside" objects are available. This commit introduces a new flag, --standalone, to git-fsck-cache. When it is not specified, connectivity checks and .git/refs pointer checks are taught that it is OK when expected objects do not exist under .git/objects/?? hierarchy but are available from an packed archive or in an alternate object pool. Another new flag, --full, makes git-fsck-cache to check not only the current GIT_OBJECT_DIRECTORY but also objects found in alternate object pools and packed GIT archives.a Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-28[PATCH] Expose packed_git and alt_odb.Libravatar Junio C Hamano2-19/+43
The commands git-fsck-cache and probably git-*-pull needs to have a way to enumerate objects contained in packed GIT archives and alternate object pools. This commit exposes the data structure used to keep track of them from sha1_file.c, and adds a couple of accessor interface functions for use by the enhanced git-fsck-cache command. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>