summaryrefslogtreecommitdiff
path: root/checkout-cache.c
AgeCommit message (Collapse)Author
2005-04-26[PATCH] introduce xmalloc and xreallocChristopher Li
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>
2005-04-24[PATCH] checkout-cache: add "-n" optionJames Bottomley
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>
2005-04-21Add support for a "GIT_INDEX_FILE" environment variable.Linus Torvalds
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"Linus Torvalds
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-18Ignore any unmerged entries for "checkout-cache -a".Linus Torvalds
They don't "exist" yet, and you need to merge them first.
2005-04-17[PATCH] Better error message from checkout-cache for unmerged files.Junio C Hamano
The checkout-cache command says "file is not in the cache" when an unmerged path is given. This patch adds code to distinguish the unmerged and the nonexistent cases and gives an appropriate error message. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-17Fix total permission bogosity in "checkout-cache.c".Linus Torvalds
Use the proper octal mode naming instead of random decimal crud, and don't reset the mode after the create with fchmod: the whole point was to let "umask" do its thing. Duh.
2005-04-17Be much more liberal about the file mode bits.Linus Torvalds
We only really care about the difference between a file being executable or not (by its owner). Everything else we leave for the user umask to decide.
2005-04-15Convert the index file reading/writing to use network byte order.Linus Torvalds
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).
2005-04-13[PATCH] Consolidate the error handlingPetr Baudis
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>
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-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-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-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.