summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2005-04-23[PATCH] Add some functions for commit listsLibravatar Daniel Barkalow2-6/+61
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>
2005-04-23[PATCH] Simplify building of programsLibravatar Jonas Fonseca1-1/+1
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>
2005-04-23[PATCH] Fix broken diff-cache output on added filesLibravatar Petr Baudis1-1/+1
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>
2005-04-23Make a hack to convert-cache for missing author dates in oldLibravatar Linus Torvalds1-0/+7
archives (notably the old sparse one). Very hacky. But hopefully we can do the conversion once, and never worry about this ever again.
2005-04-23Make "convert-cache" able to handle the really old archive formatsLibravatar Linus Torvalds1-13/+206
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.
2005-04-23Use O_NOATIME when opening the sha1 files.Libravatar Linus Torvalds1-3/+26
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.
2005-04-22[PATCH] PPC assembly implementation of SHA1Libravatar Paul Mackerras4-1/+283
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>
2005-04-22New "diff-cache" implementation.Libravatar Linus Torvalds3-182/+58
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.
2005-04-22Move "read_tree()" to "tree.c" to be used as a generic helper function.Libravatar Linus Torvalds3-63/+71
Next step: make "diff-cache" use it.
2005-04-22Clean up and simplify read-tree a bit.Libravatar Linus Torvalds1-7/+6
This is preparation for moving parts of it into "tree.c" to be used as a library function.
2005-04-21Add support for alternate SHA1 library implementations.Libravatar Linus Torvalds4-12/+209
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.
2005-04-21Split up Makefile library list handling with separate entries forLibravatar Linus Torvalds1-2/+4
zlib and libssl. I'll start giving people choices here..
2005-04-21Include <limits.h> in commit.c for ULONG_MAX. Remove old "revision.h".Libravatar Linus Torvalds2-164/+1
The old revision.h helper header isn't used any more, but I never noticed it until I started grepping for ULONG_MAX users.
2005-04-21Add support for a "GIT_INDEX_FILE" environment variable.Libravatar Linus Torvalds6-20/+31
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.
2005-04-21Add the ability to prefix something to the pathname to "checkout-cache.c"Libravatar Linus Torvalds1-16/+28
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".
2005-04-21Fix NSEC compile problem, and properly parse the rev-tree cmd line.Libravatar Linus Torvalds2-4/+3
The rev-tree thing just happened to work. It shouldn't have.
2005-04-20[PATCH] Usage-string fixes.Libravatar Junio C Hamano4-16/+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>
2005-04-20Duh, just make git-export.c use the proper syntax, everything is fine.Libravatar Linus Torvalds1-1/+1
2005-04-20Fix up some problems from the commit->tree helper patchLibravatar Linus Torvalds1-2/+2
2005-04-20Fix up git-export to use the lower-level interfaces for diff generation.Libravatar Linus Torvalds1-1/+1
The high-level helpers seem to have forgotten what to do with sha1 names.
2005-04-20[PATCH] Teach read-tree about commit objectsLibravatar Junio C Hamano1-10/+24
Updates read-tree to use read_tree_with_tree_or_commit_sha1() function. The command can take either tree or commit IDs with this patch. The change involves a slight modification of how it recurses down the tree. Earlier the caller only supplied SHA1 and the recurser read the object using it, but now it is the caller's responsibility to read the object and give it to the recurser. This matches the way recursive behaviour is done in other tree- related commands. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-20[PATCH] Teach ls-tree about commit objectsLibravatar Junio C Hamano1-6/+5
Updates ls-tree.c to use read_tree_with_tree_or_commit_sha1() function. The command can take either tree or commit IDs with this patch. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-20[PATCH] Teach diff-tree about commit objectsLibravatar Junio C Hamano1-21/+4
Updates diff-tree.c to use read_tree_with_tree_or_commit_sha1() function. The command can take either tree or commit IDs with this patch. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-20[PATCH] Teach diff-cache about commit objectsLibravatar Junio C Hamano1-16/+1
Updates diff-cache.c to use read_tree_with_tree_or_commit_sha1() function. The end-user visible result is the same --- the command takes either tree or commit ID. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-20[PATCH] Accept commit in some places when tree is needed.Libravatar Junio C Hamano2-0/+44
This patch implements read_tree_with_tree_or_commit_sha1(), which can be used when you are interested in reading an unpacked raw tree data but you do not know nor care if the SHA1 you obtained your user is a tree ID or a commit ID. Before this function's introduction, you would have called read_sha1_file(), examined its type, parsed it to call read_sha1_file() again if it is a commit, and verified that the resulting object is a tree. Instead, this function does that for you. It returns NULL if the given SHA1 is not either a tree or a commit. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-20[PATCH] simplify MakefileLibravatar Andre Noll1-47/+2
Use a generic rule for executables that depend only on the corresponding .o and on $(LIB_FILE). Signed-Off-By: Andre Noll <maan@systemlinux.org> Signed-Off-By: Linus Torvalds <torvalds@osdl.org>
2005-04-20Improve build: add <unistd.h> and use -O2 instead of -O3Libravatar Linus Torvalds2-1/+2
(Nobody should use -O3. It just makes bad inlining decisions).
2005-04-20Make the sha1 of the index file go at the very end of the file.Libravatar Linus Torvalds2-24/+21
This allows us to both calculate it and verify it faster.
2005-04-20Speed up index file writing by chunking it nicely.Libravatar Linus Torvalds1-4/+39
No point in making 17,000 small writes when you can make just a couple of hundred nice 8kB writes instead and save a lot of time.
2005-04-20Make "write_sha1_file()" exit early if the file already exists.Libravatar Linus Torvalds1-4/+22
Avoid the compression.
2005-04-20The recent hash/compression switch-over missed the blob creation.Libravatar Linus Torvalds1-5/+9
Happily, convert-cache just magically fixes all errors.
2005-04-20Do SHA1 hash _before_ compression.Libravatar Linus Torvalds5-13/+158
And add a "convert-cache" program to convert from old-style to new-style.
2005-04-19[PATCH] init-db.c: create and use safe_create_dir helperLibravatar Zach Welch1-16/+14
Factor mkdir calls into common safe_create_dir subroutine. Signed-Off-By: Zach Welch <zw@superlucidity.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-19[PATCH] init-db.c: normalize env var handling.Libravatar Zach Welch1-8/+3
Normalize init-db environment variable handling, allowing the creation of object directories with something other than DEFAULT_DB_ENVIRONMENT. Signed-Off-By: Zach Welch <zw@superlucidity.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-19[PATCH] init-db.c: cleanup commentsLibravatar Zach Welch1-9/+6
Consolidate comments at top of main. Signed-Off-By: Zach Welch <zw@superlucidity.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-19Make "diff-tree" take commit objects too, like "diff-cache" does.Libravatar Linus Torvalds1-0/+16
Sometimes it's just easier to not have to look up the "commit"->"tree" translation by hand first. It's trivial to do inside diff-tree, and it's just being polite.
2005-04-19Add "diff-cache" helper program to compare a tree (or commit) withLibravatar Linus Torvalds2-2/+274
the current cache state and/or working directory. Very useful to see what has changed since the last commit, either in the index file or in the whole working directory. Also very possibly very buggy. Matching the two up is not entirely trivial.
2005-04-19Make us be better at guessing a good hostname for the email.Libravatar Linus Torvalds1-2/+4
It's still just a guess, and the result is not a real email address anyway. If you want to, you can use COMMIT_AUTHOR_EMAIL to correct for any git guesses.
2005-04-19Remove duplicate getenv(DB_ENVIRONMENT) callLibravatar Linus Torvalds1-1/+1
Noted by Tony Luck.
2005-04-19Add stupid "git export" thing, which can export a git archiveLibravatar Linus Torvalds2-1/+86
as a set of patches and commentary. You'd want something like this if you are tracking a git archive in another SCM format. Notably, we want something like that for BK users.
2005-04-19Fix init-db shared database caseLibravatar Linus Torvalds1-1/+1
Noted by Aaron Straus
2005-04-19Update "git-pull-script" to use "read-tree -m" forLibravatar Linus Torvalds1-2/+2
reading a single tree too. That should speed up a trivial merge noticeably. Also, don't bother reading back the tree we just wrote when we committed a real merge. It had better be the same one we still have..
2005-04-19Make "read-tree" know how to do a "1-way merge".Libravatar Linus Torvalds1-5/+39
This one just reads one tree, but picks up any matching stat information from the old index.
2005-04-19Make "read-tree" take the 'stat' information for a merge result from theLibravatar Linus Torvalds1-2/+39
old index state if the result matches. This leaves the stat information in the result tree for any trivial merges, which is just the way we like it.
2005-04-19Make git-pull-script do the right thing for symlinked HEAD's.Libravatar Linus Torvalds1-1/+3
Also exit gracefully if the HEAD pull failed, rather than use a possibly stale MERGE_HEAD.
2005-04-19Don't parse commit objects more than once.Libravatar Linus Torvalds1-0/+4
Yes, the "parse_commit()" already checks for this condition, but we need to check for it in rev-tree too, so that we don't start walking the parent chain unnecessarily.
2005-04-18[PATCH] SCSI trees, merges and git statusLibravatar James Bottomley1-1/+10
Doing the latest SCSI merge exposed two bugs in your merge script: 1) It doesn't like a completely new directory (the misc tree contains a new drivers/scsi/lpfc) 2) the merge testing logic is wrong. You only want to exit 1 if the merge fails.
2005-04-18[PATCH] provide better committer information to commit-tree.cLibravatar Greg KH1-5/+9
Here's a small patch to commit-tree.c that does two things: - allows the committer email address and name to be overridden by environment variables (if you don't like the environment variable names I've used (COMMIT_AUTHOR_NAME, COMMIT_AUTHOR_EMAIL), feel free to change them.) - provide the proper domainname to the author/committer email address (otherwise, my address was only showing up as from the hostname.) This allows people to set sane values for the commit names and email addresses, preventing odd, private hostnames and domains from being exposed to the world. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-18Make fsck-cache print the object type for unreachable objects.Libravatar Linus Torvalds1-1/+1
This got lost when I updated to Daniel's new object model.
2005-04-18[PATCH] show-diff: Remove stale commentsLibravatar Junio C Hamano1-3/+0
Patch 1/6 in the series has already cleaned the interface to call sq_expand(), but the comment before that function still carries the stale interface warning. Remove it. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>