summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2005-04-13[PATCH] ls-tree for listing treesPetr Baudis
ls-tree tool provides just a way to export the binary tree objects to a usable text format. This is bound to be useful in variety of scripts, although none of those I have currently uses it. But e.g. the simple script I've sent to HPA for purging the object database uses it. Signed-off-by: Petr Baudis <pasky@ucw.cz>
2005-04-13[PATCH] Correct show-diff output for deleted filesPetr Baudis
My convention is that contrary to files trimmed to zero size, deleted files always go to /dev/null. This patch turns show-diff to abide this. Signed-off-by: Petr Baudis <pasky@ucw.cz>
2005-04-13[PATCH] Silent flag for show-diffPetr Baudis
This patch adds a -s flag for show-diff, which will surpress the actual diffing. This is useful for my scripts when they just want to see what needs to be updated in the cache. Signed-off-by: Petr Baudis <pasky@ucw.cz>
2005-04-12[PATCH] Fix a crash when doing rev-treePetr Baudis
In parse_commit(), free(buffer) is fed a bogus pointer. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-12Make "checkout-cache" silently skip up-to-date files.Linus Torvalds
It used to always overwrite them if forced. Now it just realizes that they are already ok, and don't need to be touched.
2005-04-12Make "rev-tree" able to read its own output again from the cache.Linus Torvalds
Also, add "date" information to the output so that you can do something like this: rev-tree `cat .git/HEAD` | sort -nr | cut -d' ' -f2 | while read i; do cat-file commit $i; done which basically becomes a "git log" (aka "git changes") where things are sorted by time.
2005-04-12[PATCH] rev-tree support for "in X but not in Y".David Woodhouse
To do the automated commit-mailing I need to be able to answer the question "which commits are here today but weren't yesterday"... i.e. given two commit-ids $HEAD and $YESTERDAY I want to be able to do: rev-tree $HEAD ^$YESTERDAY to list those commits which are in the tree now but weren't ancestors of yesterday's head. Yes, I could probably do this with rev-tree $HEAD $YESTERDAY | egrep -v ^[a-z0-9]*:3 but I prefer not to.
2005-04-12[PATCH] show-diff show deleted files as diff as well.Christopher Li
The ideas is that using the show-diff to generate the patch including deleted and new file (in the next patch). So we don't have to do the temp new file diff dance on the script. The cache index now contain enough information to generate the whole patch. So the GIT SCM don't need separate command for check out file to edit or delete. Just do the edit and remove and GIT will generate the correct patch. It still require tell GIT to add new files.
2005-04-12Remove the annoying "ok" printout from show-diff.Linus Torvalds
It used to be useful before I wrote "show-files", so that show-diff would also tell what the cached files were. Now it's just annoying.
2005-04-12Add a "check-files" command, which is useful for scriptingLinus Torvalds
patches. In particular, it verifies that all the listed files are up-to-date in the cache (or don't exist and are ready to be added).
2005-04-12Add "show-files" command to show the list of managed (or non-managed) files.Linus Torvalds
You want things like this to check in a patch..
2005-04-12Allow zero-sized files to be checked in.Linus Torvalds
The kernel may not want it, but others probably do. Noted (again) by Junio Hamano.
2005-04-12Make the rev-tree output more regular. This is the lastLinus Torvalds
change. Promise. It now always outputs all the revisions as <sha1>:<reachability>, where the reachability is the bitmask of how that revision was reachable from the commits in the argument list. Trivially, if there is only one commit, the reachability will always be (1 << 0) == 1 for all reachable revisions, and there won't be any edges (so the "--edges" flag only makes sense with multiple commit keys).
2005-04-12Make "rev-tree" capable of showing the difference in reachability between twoLinus Torvalds
or more commit points. This is important both to know what the difference between two commit points is, but also to figure out where to try to merge from.
2005-04-11Make "rev-tree" more efficient and more useful.Linus Torvalds
Slight change of output format: it now lists all parents on the same line. This allows it to work on initial commits too (which have no parents), and also makes the output format a lot more intuitive.
2005-04-11Rename ".dircache" directory to ".git"Linus Torvalds
I started out calling the tool "dircache". That's clearly moronic.
2005-04-11Fix stale index.lock file removal using "atexit()".Linus Torvalds
Problem noted by Randy Dunlap.
2005-04-11Add a "rev-tree" helper, which calculates the revisionLinus Torvalds
tree graph. It's quite fast when the commit-objects are cached, but since it has to walk every single commit-object, it also allows you to cache an old state and just add on top of that.
2005-04-11Fix "usage()" to do the missing line termination.Linus Torvalds
It got broken when I changed it to use stdarg.
2005-04-11Fix "update-cache" not fixing up the size field as appropriate.Linus Torvalds
The size field isn't in the tree information, so we need to update it if the sha1 matches.
2005-04-11Make the default directory permissions more lax.Linus Torvalds
After all, if you want to not allow others to read your stuff, set your "umask" appropriately or make sure the parent directories aren't readable/executable.
2005-04-11Add a COPYING notice, making it explicit that the license is GPLv2.Linus Torvalds
Let's bite the v3 bullet when it comes, although if people want to, they can just state "or later at discretion of Linus" in their copyright messages.
2005-04-11Make "update-cache --refresh" do what it really should do: justLinus Torvalds
refresh the "stat" information. We need this after having done a "read-tree", for example, when the stat information does not match the checked-out tree, and we want to start getting efficient cache matching against the parts of the tree that are already up-to-date.
2005-04-11Fix up commit-tree/diff-tree user interface issues.Linus Torvalds
No, this doesn't make them easy to use, but makes diff-tree use the "-r" flag for "recursive" (not "-R") and makes commit-tree use AUTHOR_xxx environment flags (not COMMITTER_xxx) to match what it actually does.
2005-04-11Oops. Fix bad initialization of the "seen" array, causing us to notLinus Torvalds
properly clear the reference count at init time. It happened to work for me by pure luck. Until it broke, and my unreferenced commit suddenly looked referenced again. Fixed.
2005-04-11Oops, the actual 'printf' for missing objects was missing.Linus Torvalds
Which made fsck very quiet about objects it hadn't found. So add it. We'll need to make things like these optional, because it's perfectly ok to have partial history if you don't want it, and don't want to go backwards. But for development, it's best to always complain about missing sha1 object files that are referenced from somewhere else.
2005-04-11Add connectivity tracking to fsck.Linus Torvalds
This shows that I've lost track of one commit already. Most likely because I forgot to update the .dircache/HEAD file when doing a commit, so that the next commit referenced not the top-of-tree, but the one older commit. Having dangling commits is fine (in fact, you should always have at least _one_ dangling commit in the top-of-tree). But it's good to know about them.
2005-04-11Fix off-by-one error in removal of cache entry.Linus Torvalds
Also make the return value of "cache_name_pos()" be sane: positive or zero if we found it (it's the index into the cache array), and "-pos-1" to indicate where it should go if we didn't.
2005-04-11Fix diff-tree recursion.Linus Torvalds
And, perhaps more importantly, fix the fact that if a filename changed from a directory to a file (or vice versa), we must consider it a delete and an add, not a "filechange".
2005-04-10Simplify "diff-tree" output, and only keep track of one single name-base.Linus Torvalds
During original development I had different name-bases for source and destination, so that I could make the output show how it got removed from "tree a" and added to "tree b", but we don't want that. We only do recursive diffs on anything where the bases are exactly the same, so we might as well just work with a single base. Also, make the output for "changed" be a single line, since people hated the separate '<' / '>' format. They were right. It sucked.
2005-04-10Add "-R" flag to "diff-tree", so that it will recursively traverse a tree of ↵Linus Torvalds
trees as it diffs them. This makes diff-tree usable again in the new world order.
2005-04-10Make "update-cache" a bit friendlier to use (and harder to mis-use).Linus Torvalds
It now requires the "--add" flag before you add any new files, and a "--remove" file if you want to mark files for removal. And giving it the "--refresh" flag makes it just update all the files that it already knows about.
2005-04-10This implements the new "recursive tree" write-tree.Linus Torvalds
It's got some debugging printouts etc still in it, but testing on the kernel seems to show that it does indeed fix the issue with huge tree files for each commit.
2005-04-09Make fsck-cache warn about old-style tree objects that have fullLinus Torvalds
pathnames in them. We're migrating away from that. This will cause tons of warnings for the current "sparse" archive, but hell, better now than later.
2005-04-09Teach "fsck" and "read-tree" about recursive tree-nodes.Linus Torvalds
This is totally untested, since we can't actually _write_ things that way yet, but I'll get to that next, I hope. That should fix the huge wasted space for kernel-sized tree objects.
2005-04-09Make "fsck-cache" print out all the root commits it finds.Linus Torvalds
Once I do the reference tracking, I'll also make it print out all the HEAD commits it finds, which is even more interesting.
2005-04-09Add "diff-tree" program to show which files have changed between two trees.Linus Torvalds
Very useful for creating diffs efficiently, and in general to see what has changed in the namespace.
2005-04-09Export "cache_name_compare()" helper function.Linus Torvalds
The "diff-tree" program needs it.
2005-04-09Make "read-tree" read the tree into the current directory cache.Linus Torvalds
It will no longer update the actual working directory, just the cache. To update the working directory, you need to use "checkout-cache".
2005-04-09Make "write_cache()" and friends available as generic routines.Linus Torvalds
This is needed for the change to make "read-tree" just read into the cache (and then you do a "checkout-cache" to update your current dir contents).
2005-04-09Fix "checkout-cache.c" mis-use of read_sha1_file() interface.Linus Torvalds
It's supposed to test the returned file type, not think that read_sha1_file() tests it. Confusion from "cat-file" command line usage.
2005-04-09Fix up "checkout-cache" a bitLinus Torvalds
Make the warnings have newlines, and don't stop "checkout-cache -a" just because a file already exists.
2005-04-09Add a "checkout-cache" command which does what the name suggests.Linus Torvalds
I'll also eventually change "read-tree" to only update the cache information, instead of doing a checkout of the tree. Much nicer.
2005-04-09Make the cache stat information comparator public.Linus Torvalds
Like the cache filename finder, it's a generically useful function, rather than something specific to the current "show-diff" thing.
2005-04-09Make "cache_name_pos()" available to others.Linus Torvalds
It finds the cache entry position for a given name, and is generally useful. Sure, everybody can just scan the active cache array, but since it's sorted, you actually want to search it with a binary search, so let's not duplicate that logic all over the place.
2005-04-09Fix missing return values and some error tests for empty index filesLinus Torvalds
Patches from Dave Jones and Ingo Molnar, but since I don't have any infrastructure in place to use the old patch applicator scripts I am trying to build up, I ended up fixing the thing by hand instead. Credit where credit is due, though. Nice to see that people are taking a look at the project even in this early stage.
2005-04-09Make fsck-cache start parsing the object types, and checking theirLinus Torvalds
internal format. This doesn't yet check the reachability information, but we're getting there.. Slowly.
2005-04-08Add "-lz" to link line to get in zlib.Linus Torvalds
Not all Linux distributions seem to need it (notably not YDL on ppc64), but enough ones obviously do.
2005-04-08Add new fsck-cache to Makefile.Linus Torvalds
This is what happens when there are no nice tools to tell you to do things properly.
2005-04-08Add first cut at "fsck-cache" that validates the SHA1 object store.Linus Torvalds
It doesn't complain about mine. But it also doesn't yet check for inter-object reachability etc.