aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* [PATCH] introduce xmalloc and xreallocChristopher Li2005-04-26
| | | | | | | | Introduce xmalloc and xrealloc to die gracefully with a descriptive message when out of memory, rather than taking a SIGSEGV. Signed-off-by: Christopher Li<chrislgit@chrisli.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* update-cache: remove index lock file on SIGINTLinus Torvalds2005-04-26
| | | | | This makes it a lot more pleasant to use when you interrupt a long-running operation.
* [PATCH] diff-cache bugletJunio C Hamano2005-04-26
| | | | | | | | | | | diff-cache attempts to first remove all merge entries before letting the diff_cache() do its work, but it incorrectly stops after the first merge-entry it finds. Fix by just replacing the "break" with a "continue". Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Diff-tree-helper take two.Junio C Hamano2005-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks the diff-tree-helper and show-diff to further make external diff command interface simpler. These commands now honor GIT_EXTERNAL_DIFF environment variable which can point at an arbitrary program that takes 7 parameters: name file1 file1-sha1 file1-mode file2 file2-sha1 file2-mode The parameters for an external diff command are as follows: name this invocation of the command is to emit diff for the named cache/tree entry. file1 pathname that holds the contents of the first file. This can be a file inside the working tree, or a temporary file created from the blob object, or /dev/null. The command should not attempt to unlink it -- the temporary is unlinked by the caller. file1-sha1 sha1 hash if file1 is a blob object, or "." otherwise. file1-mode mode bits for file1, or "." for a deleted file. If GIT_EXTERNAL_DIFF environment variable is not set, the default is to invoke diff with the set of parameters old show-diff used to use. This built-in implementation honors the GIT_DIFF_CMD and GIT_DIFF_OPTS environment variables as before. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Introduce diff-tree-helper.Junio C Hamano2005-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new program, diff-tree-helper. It reads output from diff-cache and diff-tree, and produces a patch file. The diff format customization can be done the same way the show-diff uses; the same external diff interface introduced by the previous patch to drive diff from show-diff is used so this is not surprising. It is used like the following examples: $ diff-cache --cached -z <tree> | diff-tree-helper -z -R paths... $ diff-tree -r -z <tree1> <tree2> | diff-tree-helper -z paths... - As usual, the use of the -z flag is recommended in the script to pass NUL-terminated filenames through the pipe between commands. - The -R flag is used to generate reverse diff. It does not matter for diff-tree case, but it is sometimes useful to get a patch in the desired direction out of diff-cache. - The paths parameters are used to restrict the paths that appears in the output. Again this is useful to use with diff-cache, which, unlike diff-tree, does not take such paths restriction parameters. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Split external diff command interface to a separate file.Junio C Hamano2005-04-25
| | | | | | | | | | | With this patch, the non-core'ish part of show-diff command that invokes an external "diff" comand to obtain patches is split into a separate file. The next patch will introduce a new command, diff-tree-helper, which uses this common diff interface to format diff-tree and diff-cache output into a patch form. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* fsck-cache: show root objects only with "--root"Linus Torvalds2005-04-25
| | | | | This makes the default fsck behaviour be quiet for a repository that doesn't have any problems. Which is good.
* fsck-cache: only show tags if asked to do so with "--tags"Linus Torvalds2005-04-25
| | | | | Normally we don't care, we just check them for being valid tag objects.
* Add the git-*-script files to the installLinus Torvalds2005-04-25
|
* Add example "git-tag-script" to show how to create signed tag objects.Linus Torvalds2005-04-25
|
* Make "fsck" also show what the name of the tag object is, not justLinus Torvalds2005-04-25
| | | | | | the name of the object it tags. You need this if you actually want to build up a list of tags.
* Add "tag" objects that can be used to sign other objects.Linus Torvalds2005-04-25
| | | | You use "git-mktag" to create them, and fsck-cache knows how to parse them.
* Fix up the types in write_sha1_fileLinus Torvalds2005-04-25
| | | | Use "unsigned long" for the size, like we do everywhere else.
* Simplify "write_sha1_file()" interfacesLinus Torvalds2005-04-25
| | | | | The write function now adds the header to the file by itself, so there is no reason to duplicate it among all the users any more.
* fsck-cache: warn about missing commit datesLinus Torvalds2005-04-24
| | | | | Now that we have hopefully converted all old archives, we can consider it an error.
* Update "convert-cache" to handle git itself.Linus Torvalds2005-04-24
| | | | | | The git archives have some old-date-format commits with timezones that the converter didn't recognize. Also, make it be quiet about already-converted dates.
* [PATCH] update-cache: add "--ignore-missing" optionJames Bottomley2005-04-24
| | | | | | | | | | | | | This adds an --ignore-missing option to update-cache, which makes it ignore missing files. Together with the "-n" option to checkout-cache, it allows me to do checkout-cache -n -f -a && update-cache --ignore-missing --refresh which only updates and refreshes the files I already have checked out. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] checkout-cache: add "-n" optionJames Bottomley2005-04-24
| | | | | | | | This adds the "-n" option to checkout-cache which tells it to not check out new files, only refresh files already checked out. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Don't add references to objects we couldn't find. Linus Torvalds2005-04-24
| | | | That would SIGSEGV.
* Verify that the object type matches for tree/commit objects even before parsing.Linus Torvalds2005-04-24
| | | | The type doesn't come from the parsing, the type also has to match the usage.
* Set object type at object creation time, not object parse time.Linus Torvalds2005-04-24
| | | | Otherwise we can have objects without a type, which is not good.
* fsck-cache: notice missing "blob" objects.Linus Torvalds2005-04-24
| | | | | | We should _not_ mark a blob object "parsed" just because we looked it up: it gets marked that way only once we've actually seen it. Otherwise we can never notice a missing blob.
* [PATCH] fix segfault in fsck-cacheAndreas Gal2005-04-24
| | | | | | | | | | | | | | | Here is how to trigger it: echo blob 100 > .git/objects/00/ae4e8d3208e09f2cf7a38202a126f728cadb49 Then run fsck-cache. It will try to unpack after the header to calculate the hash, inflate returns total_out == 0 and memcpy() dies. The patch below seems to work with ZLIB 1.1 and 1.2. Signed-off-by: Andreas Gal <gal@uci.edu> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Support a fine-grained diff-treeLinus Torvalds2005-04-23
| | | | | | | | | | | | This is based on a patch by David Woodhouse, but with the selection tests much simplified and streamlined. It makes diff-tree take extra arguments, specifying the files or directories which should be considered "interesting". Changes in uninteresting directories are not reported. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] make file merging respect permissionsJames Bottomley2005-04-23
| | | | | | | | | | | | | | | 1) permissions aren't respected in the merge script (primarily because they're never passed in to it in the first place). Fix that and also check for permission conflicts in the merge 2) the delete of a file in both branches may indeed be just that, but it could also be the indicator of a rename conflict (file moved to different locations in both branches), so error out and ask the committer for guidance. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Allow multiple date-ordered listsDaniel Barkalow2005-04-23
| | | | | | | | | | | Make pop_most_recent_commit() return the same objects multiple times, but only if called with different bits to mark. This is necessary to make merge-base work again. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Don't add parents to the commit list if we have alreadyLinus Torvalds2005-04-23
| | | | | | seen them. Otherwise any merges will make the parent list explode.
* Add "rev-list" program that uses the new time-based commit listing.Linus Torvalds2005-04-23
| | | | This is probably what you'd want to see for "git log".
* [PATCH] Various transport programsDaniel Barkalow2005-04-23
| | | | | | | | | | | | | | | | | This patch adds three similar and related programs. http-pull downloads objects from an HTTP server; rpull downloads objects by using ssh and rpush on the other side; and rpush uploads objects by using ssh and rpull on the other side. The algorithm should be sufficient to make the network throughput required depend only on how much content is new, not at all on how much content the repository contains. The combination should enable people to have remote repositories by way of ssh login for authenticated users and HTTP for anonymous access. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Replace merge-base implementationDaniel Barkalow2005-04-23
| | | | | | | | | | The old implementation was a nice algorithm, but, unfortunately, it could be confused in some cases and would not necessarily do the obvious thing if one argument was decended from the other. This version fixes that by changing the criterion to the most recent common ancestor. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Additional functions for the objects databaseDaniel Barkalow2005-04-23
| | | | | | | | | This adds two functions: one to check if an object is present in the local database, and one to add an object to the local database by reading it from a file descriptor and checking its hash. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Parse tree objects completelyDaniel Barkalow2005-04-23
| | | | | | | This adds the contents of trees to struct tree. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Add some functions for commit listsDaniel Barkalow2005-04-23
| | | | | | | | | This adds a function for inserting an item in a commit list, a function for sorting a commit list by date, and a function for progressively scanning a commit history from most recent to least recent. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Simplify building of programsJonas Fonseca2005-04-23
| | | | | | | | Do not first build .o files when building programs. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Fix broken diff-cache output on added filesPetr Baudis2005-04-23
| | | | | | | | | Added files were errorneously reported with the - prefix by diff-cache, obviously leading to great confusion. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Make a hack to convert-cache for missing author dates in oldLinus Torvalds2005-04-23
| | | | | | | archives (notably the old sparse one). Very hacky. But hopefully we can do the conversion once, and never worry about this ever again.
* Make "convert-cache" able to handle the really old archive formatsLinus Torvalds2005-04-23
| | | | | | This includes the old-style "flat tree" object, and the old broken date format. Well, enough of the date format to convert the sparse archive, at least.
* Use O_NOATIME when opening the sha1 files.Linus Torvalds2005-04-23
| | | | | | | | | | We really don't care about atime, and it sucks to dirty the inode cache just for it. This is more than a one-liner only because we need to be able to clear the O_NOATIME flag in case some of the objects are owned by others (in which case open will return EPERM), and because not everybody has the O_NOATIME flag.
* [PATCH] PPC assembly implementation of SHA1Paul Mackerras2005-04-22
| | | | | | | | | Here is a SHA1 implementation with the core written in PPC assembly. On my 2GHz G5, it does 218MB/s, compared to 135MB/s for the openssl version or 45MB/s for the mozilla version. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* New "diff-cache" implementation.Linus Torvalds2005-04-22
| | | | | | | | | | This one is about a million times simpler, and much more likely to be correct too. Instead of trying to match up a tree object against the index, we just read in the tree object side-by-side into the index, and just walk the resulting index file. This was what all the read-tree cleanups were all getting to.
* Move "read_tree()" to "tree.c" to be used as a generic helper function.Linus Torvalds2005-04-22
| | | | Next step: make "diff-cache" use it.
* Clean up and simplify read-tree a bit.Linus Torvalds2005-04-22
| | | | | This is preparation for moving parts of it into "tree.c" to be used as a library function.
* Add support for alternate SHA1 library implementations.Linus Torvalds2005-04-21
| | | | | | | | | | This one includes the Mozilla SHA1 implementation sent in by Edgar Toernig. It's dual-licenced under MPL-1.1 or GPL, so in the context of git, we obviously use the GPL version. Side note: the Mozilla SHA1 implementation is about twice as fast as the default openssl one on my G5, but the default openssl one has optimized x86 assembly language on x86. So choose wisely.
* Split up Makefile library list handling with separate entries forLinus Torvalds2005-04-21
| | | | | | zlib and libssl. I'll start giving people choices here..
* Include <limits.h> in commit.c for ULONG_MAX. Remove old "revision.h".Linus Torvalds2005-04-21
| | | | | The old revision.h helper header isn't used any more, but I never noticed it until I started grepping for ULONG_MAX users.
* Add support for a "GIT_INDEX_FILE" environment variable.Linus Torvalds2005-04-21
| | | | | | | | | We use that to specify alternative index files, which can be useful if you want to (for example) generate a temporary index file to do some specific operation that you don't want to mess with your main one with. It defaults to the regular ".git/index" if it hasn't been specified.
* Add the ability to prefix something to the pathname to "checkout-cache.c"Linus Torvalds2005-04-21
| | | | | | | | | | | | | | | | | This basically makes it trivial to use checkout-cache as a "export as tree" function. Just read the desired tree into the index, and do a checkout-cache --prefix=export-dir/ -a and checkout-cache will "export" the cache into the specified directory. NOTE! The final "/" is important. The exported name is literally just prefixed with the specified string, so you can also do something like checkout-cache --prefix=.merged- Makefile to check out the currently cached copy of "Makefile" into the file ".merged-Makefile".
* Fix NSEC compile problem, and properly parse the rev-tree cmd line.Linus Torvalds2005-04-21
| | | | The rev-tree thing just happened to work. It shouldn't have.
* [PATCH] Usage-string fixes.Junio C Hamano2005-04-20
| | | | | | | | | | | | | | Usage string fixes to make maintenance easier (only one instance of a string to update not multiple copies). I've spotted and corrected inconsistent usage text in diff-tree while doing this. Also diff-cache and read-tree usage text have been corrected to match their up-to-date features. Earlier, neither "--cached" form of diff-cache nor "-m single-merge" form of read-tree were described. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Duh, just make git-export.c use the proper syntax, everything is fine.Linus Torvalds2005-04-20
|