summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Make send/receive-pack be closer to doing something interestingLinus Torvalds2005-06-295-126/+148
|
* Start of "git-send-pack", the local part of sending off a packLinus Torvalds2005-06-292-1/+120
| | | | Like git-receive-pack, this is only partway done.
* Add first cut at "git-receive-pack"Linus Torvalds2005-06-293-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.
* Remove bogus dup commit warning with --merge-orderLinus Torvalds2005-06-291-4/+1
| | | | | It makes gitk unhappy, and besides, non-merge-order doesn't complain, so why do it here..
* Teach git-rev-list about non-commit objectsLinus Torvalds2005-06-291-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.
* Prepare git-rev-list for tracking tag objects tooLinus Torvalds2005-06-291-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.
* [PATCH] Adjust t5300 test for unpack-objects changeJunio C Hamano2005-06-291-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>
* Re-instate dry-run logic in git-unpack-objectsLinus Torvalds2005-06-291-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.
* Clean up git-unpack-objects a bitLinus Torvalds2005-06-291-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.
* [PATCH] Add git-verify-pack command.Junio C Hamano2005-06-2910-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>
* [PATCH] Fixlets on top of Nico's clean-up.Junio C Hamano2005-06-293-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>
* [PATCH] assorted delta code cleanupNicolas Pitre2005-06-296-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>
* Fix packed_delta_info() that was broken by the delta header packing changeLinus Torvalds2005-06-281-20/+18
| | | | Pointed out by Junio.
* Make git pack files use little-endian size encodingLinus Torvalds2005-06-285-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.
* [PATCH] denser delta header encodingNicolas Pitre2005-06-283-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>
* [PATCH] Emit base objects of a delta chain when the delta is output.Junio C Hamano2005-06-281-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>
* git-unpack-objects: re-write to read from stdinLinus Torvalds2005-06-281-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.
* [PATCH] Use enhanced diff_delta() in the similarity estimator.Junio C Hamano2005-06-281-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>
* [PATCH] Fix unpack-objects for header length information.Junio C Hamano2005-06-282-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>
* Merge fighting fsck-cache updates from JunioLinus Torvalds2005-06-284-28/+103
|\ | | | | | | | | It's just easier to let git help out with the merge than it is to try to fix up the diffs.
| * [PATCH] Update fsck-cache (take 2)Junio C Hamano2005-06-282-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>
| * [PATCH] Expose packed_git and alt_odb.Junio C Hamano2005-06-282-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>
* | [PATCH] Bugfix: initialize pack_base to NULL.Junio C Hamano2005-06-281-0/+1
| | | | | | | | | | | | | | | | This was causing random segfaults, because use_packed_git() got confused by random garbage there. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] Adjust fsck-cache to packed GIT and alternate object pool.Junio C Hamano2005-06-281-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Change pack file format. Hopefully for the last time.Linus Torvalds2005-06-284-73/+174
|/ | | | | | This also adds a header with a signature, version info, and the number of objects to the pack file. It also encodes the file length and type more efficiently.
* git-pack-objects: add "--stdout" flag to write the pack file to stdoutLinus Torvalds2005-06-281-6/+15
| | | | This also suppresses creation of the index file.
* csum-file: add "sha1fd()" to create a SHA1 csum file from an existing file ↵Linus Torvalds2005-06-282-0/+21
| | | | | | descriptor We'll use this soon to write pack-files to stdout.
* Duh. Fix transposed characters in git-pull-scriptLinus Torvalds2005-06-281-1/+1
| | | | I'd stupidly only tested the non-branch-name version.
* Teach packing about "tag" objectsLinus Torvalds2005-06-283-14/+23
| | | | | (And teach sha1_file and unpack-object know how to unpack them too, of course)
* [PATCH] git-cat-file: '-s' to find out object size.Junio C Hamano2005-06-282-6/+19
| | | | | | | | | | We use sha1_object_info() now, and getting size is also trivial. I admit that this is more of "because we can" not "because I see immediate need for it", though. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] git-cat-file: use sha1_object_info() on '-t'.Junio C Hamano2005-06-281-6/+4
| | | | | | | | When trying to find out the type of the object, there is no need to uncompress the whole object. Just use sha1_object_info(). Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Obtain sha1_file_info() for deltified pack entry properly.Junio C Hamano2005-06-281-4/+69
| | | | | | | | | | | | | The initial one was not doing enough to figure things out without uncompressing too much. It also fixes a potential segfault resulting from missing use_packed_git() call. We would need to introduce unuse_packed_git() call and do proper use counting to figure out when it is safe to unmap, but currently we do not unmap packed file yet. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Teach git-pull-script about pulling tagsLinus Torvalds2005-06-271-2/+7
|
* Fix another test that broke with the recent git-init-db updateLinus Torvalds2005-06-271-1/+0
| | | | | t5300-pack-object.sh test 8 expected to have to create the "pack" directory itself, and was unhappy when it already existed.
* [PATCH] Skip writing out sha1 files for objects in packed git.Junio C Hamano2005-06-271-12/+27
| | | | | | | | | | | Now, there's still a misfeature there, which is that when you create a new object, it doesn't check whether that object already exists in the pack-file, so you'll end up with a few recent objects that you really don't need (notably tree objects), and this patch fixes it. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] replace sha1sum with sum in t/t1002Mark Allen2005-06-271-15/+32
| | | | | | | | | | | | | | This replaces sha1sum(1) with sum(1) in t/t1002. GNU sum(1) runs in "BSD compatibility" mode by default, and not all systems have GNU coreutils. On any system without GNU coreutils (or sha1sum) t1002 will fail. This patch should make t1002 complete successfully everywhere that sum(1) runs. I've tested this on Darwin and Linux; it works on both platforms. Signed-off-by: Mark Allen <mrallen1@yahoo.com> Acked-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Fix up test that counted subdirectories in ".git/objects"Linus Torvalds2005-06-271-3/+3
| | | | Now there are 257 of them (256 numeric ones, and the new "pack" directory)
* git-init-db: create "pack" subdirectory under objectsLinus Torvalds2005-06-271-0/+2
| | | | | Don't make the user have to mkdir it just because he's excited about the new object pack functionality, do it for him.
* Merge rsync://rsync.kernel.org/pub/scm/gitk/gitkLinus Torvalds2005-06-271-139/+447
|\
| * Add a menu item for creating tags.Paul Mackerras2005-06-271-43/+140
| |
| * Fix a bug where we would corrupt the stuff read from git-rev-list.Paul Mackerras2005-06-271-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | If we have a very long commit message, and we end up getting a bufferfull of data from git-rev-list that all belongs to one commit, we ended up throwing away the data from a previous read that should have been included. The result was a error message about not being able to parse the output of git-rev-list. Also, if the git-rev-list output that we can't parse is long, only put the first 80 chars in the error message. Otherwise we end up with an enormous error window.
| * Add a menu entry for generating a patch between any two commits.Paul Mackerras2005-06-271-0/+87
| |
| * Fix behaviour in the case where we have no commits to display.Paul Mackerras2005-06-271-10/+17
| | | | | | | | | | I had code in there to put "No commits selected" on the canvas but it needed some globals.
| * Check for the existence of the git directory on startup.Paul Mackerras2005-06-271-1/+11
| | | | | | | | | | | | Check that $GIT_DIR (or .git, if GIT_DIR is not set) is a directory. This means we can give a more informative error message if the user runs gitk somewhere that isn't a git repository.
| * Clear the SHA1 entry field when we go to paste something into itPaul Mackerras2005-06-251-0/+8
| | | | | | | | | | If the user pastes in the selection (with the middle mouse button) and it already has 40 characters in it, clear it before pasting.
| * Add commit row context menu and handle left-click on graph linesPaul Mackerras2005-06-251-86/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right-click on a context row now brings up a menu allowing the user to generate a diff between that row and the selected row. Left-click on a graph line shows the parent and children connected by the line in the details pane. Left-click on a circle in the graph selects that commit. Left-click elsewhere in the graph does nothing. When displaying a diff, the bottom-right file list box behaves slightly differently now; instead of eliding all other files' diffs, it now just scrolls the details pane so that the selected file's diff starts at the top of the pane. Since the diffs can be rather large, arrange for an update to be done every 100ms while reading diffs. Also removed the CVS revision keywords and bumped the version number to 1.2.
* | csum-file: fix missing buf pointer updateLinus Torvalds2005-06-271-0/+1
| | | | | | | | This would create broken pack archives for anything nontrivial.
* | [PATCH] Teach read_sha1_file() and friends about packed git object store.Junio C Hamano2005-06-272-12/+458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GIT_OBJECT_DIRECTORY and GIT_ALTERNATE_OBJECT_DIRECTORIES can have the "pack" subdirectory that houses "packed GIT" files produced by git-pack-objects (e.g. .git/objects/pack/foo.pack and .git/objects/pack/foo.idx; always store them as pairs). The following functions in sha1_file.c can then read object contents from such packed file: - sha1_object_info() - has_sha1_file() - read_sha1_file() Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] Enhance sha1_file_size() into sha1_object_info()Junio C Hamano2005-06-274-31/+27
| | | | | | | | | | | | | | | | This lets us eliminate one use of map_sha1_file() outside sha1_file.c, to bring us one step closer to the packed GIT. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] Remove "delta" object representation.Junio C Hamano2005-06-2725-948/+22
| | | | | | | | | | | | | | | | | | | | | | Packed delta files created by git-pack-objects seems to be the way to go, and existing "delta" object handling code has exposed the object representation details to too many places. Remove it while we refactor code to come up with a proper interface in sha1_file.c. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>