summaryrefslogtreecommitdiff
path: root/update-cache.c
Commit message (Collapse)AuthorAgeFilesLines
* Encode a few extra flags per index entry.Linus Torvalds2005-04-151-2/+2
| | | | | | This will allow us to have the same name in different "states" in the index at the same time. Which in turn seems to be a very simple way to merge.
* Add "--cacheinfo" option to update-cache.Linus Torvalds2005-04-151-0/+35
| | | | | | This allows scripts to manually add entries to the cache explicitly. Need to do some way to remove them too, even if the path exists.
* Convert the index file reading/writing to use network byte order.Linus Torvalds2005-04-151-14/+11
| | | | | | | This allows using a git tree over NFS with different byte order, and makes it possible to just copy a fully populated repository and have the end result immediately usable (needing just a refresh to update the stat information).
* [PATCH] nsec portabilityPetr Baudis2005-04-131-0/+4
| | | | | | | | It seems like the nsec portability is limited; in particular, older glibcs (<=2.2.4 at least) don't seem to like it. So access the nsec fields in struct stat only when -DNSEC. Signed-off-by: Petr Baudis <pasky@ucw.cz>
* [PATCH] Whitespace FixesIngo Molnar2005-04-131-1/+1
| | | | | | | | Trivial whitespace fixes. From: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Petr Baudis <pasky@ucw.cz>
* [PATCH] Consolidate the error handlingPetr Baudis2005-04-131-5/+5
| | | | | | | Now there is error() for "library" errors and die() for fatal "application" errors. usage() is now used strictly only for usage errors. Signed-off-by: Petr Baudis <pasky@ucw.cz>
* Allow zero-sized files to be checked in.Linus Torvalds2005-04-111-4/+8
| | | | | | The kernel may not want it, but others probably do. Noted (again) by Junio Hamano.
* Rename ".dircache" directory to ".git"Linus Torvalds2005-04-111-4/+4
| | | | I started out calling the tool "dircache". That's clearly moronic.
* Fix stale index.lock file removal using "atexit()".Linus Torvalds2005-04-111-17/+24
| | | | Problem noted by Randy Dunlap.
* Fix "update-cache" not fixing up the size field as appropriate.Linus Torvalds2005-04-111-5/+6
| | | | | The size field isn't in the tree information, so we need to update it if the sha1 matches.
* Make "update-cache --refresh" do what it really should do: justLinus Torvalds2005-04-111-19/+99
| | | | | | | | | 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.
* Make "update-cache" a bit friendlier to use (and harder to mis-use).Linus Torvalds2005-04-101-3/+57
| | | | | | | 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.
* Make "write_cache()" and friends available as generic routines.Linus Torvalds2005-04-091-69/+0
| | | | | | 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).
* Make "cache_name_pos()" available to others.Linus Torvalds2005-04-091-36/+0
| | | | | | | | 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.
* Use "-Wall -O2" for the compiler to get more warnings.Linus Torvalds2005-04-081-0/+2
| | | | | | | And fix up the warnings that it pointed out. Let's keep the tree clean from early on. Not that the code is very beautiful anyway ;)
* Add copyright notices.Linus Torvalds2005-04-071-0/+5
| | | | | | The tool interface sucks (especially "committing" information, which is just me doing everything by hand from the command line), but I think this is in theory actually a viable way of describing the world. So copyright it.
* Initial revision of "git", the information manager from hellinitialLinus Torvalds2005-04-071-0/+248