- 07 11月, 2005 1 次提交
-
-
由 Johannes Schindelin 提交于
This fixes a problem in safe_create_leading_directories() when the argument starts with a '/' (i.e. the path is absolute). Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 27 10月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
Recent FAT workaround caused compilation trouble on OpenBSD; different platforms use different error codes when we try to hardlink the temporary file to its final location. Existing Coda hack also checks its own error code, but the thing is, the case we care about is if link failed for a reason other than that the final file has already existed (which would be normal, or it could mean collision). So just check the error code against EEXIST. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 26 10月, 2005 1 次提交
-
-
由 Johannes Schindelin 提交于
FAT -- like Coda -- does not like cross-directory hard links. To be precise, FAT does not like links at all. But links are not needed either. So get rid of them. Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 14 10月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
If we want to re-pack just local packfiles, we need to know whether a particular object is local or not. Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 12 10月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
This starts using the "user.name" and "user.email" config variables if they exist as the default name and email when committing. This means that you don't have to use the GIT_COMMITTER_EMAIL environment variable to override your email - you can just edit the config file instead. The patch looks bigger than it is because it makes the default name and email information non-static and renames it appropriately. And it moves the common git environment variables into a new library file, so that you can link against libgit.a and get the git environment without having to link in zlib and libcrypt. In short, most of it is renaming and moving, the real change core is just a few new lines in "git_default_config()" that copies the user config values to the new base. It also changes "git-var -l" to list the config variables. Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 11 10月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
The http commit walker cannot use the same temporary file creation code because it needs to use predictable temporary filename for partial fetch continuation purposes, but the code to move the temporary file to the final location should be usable from the ordinary object creation codepath. Export move_temp_to_file from sha1_file.c and use it, while losing the custom relink_or_rename function from http-fetch.c. Also the temporary object file creation part needs to make sure the leading path exists, in preparation of the really lazy fan-out directory creation. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 09 10月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
This makes it possible to have a "sparse" git object subdirectory structure, something that has become much more attractive now that people use pack-files all the time. As a result of pack-files, a git object directory doesn't necessarily have any individual objects lying around, and in that case it's just wasting space to keep the empty first-level object directories around: on many filesystems the 256 empty directories will be aboue 1MB of diskspace. Even more importantly, after you re-pack a project that _used_ to be unpacked, you could be left with huge directories that no longer contain anything, but that waste space and take time to look through. With this change, "git prune-packed" can just do an rmdir() on the directories, and they'll get removed if empty, and re-created on demand. This patch also tries to fix up "write_sha1_from_fd()" to use the new common infrastructure for creating the object files, closing a hole where we might otherwise leave half-written objects in the object database. [jc: I unoptimized the part that really removes the fan-out directories to ease transition. init-db still wastes 1MB of diskspace to hold 256 empty fan-outs, and prune-packed rmdir()'s the grown but empty directories, but runs mkdir() immediately after that -- reducing the saving from 150KB to 146KB. These parts will be re-introduced when everybody has the on-demand capability.] Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 07 10月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
This adds more cruft to diff --git header to record the blob SHA1 and the mode the patch/diff is intended to be applied against, to help the receiving end fall back on a three-way merge. The new header looks like this: diff --git a/apply.c b/apply.c index 7be5041..8366082 100644 --- a/apply.c +++ b/apply.c @@ -14,6 +14,7 @@ // files that are being modified, but doesn't apply the patch // --stat does just a diffstat, and doesn't actually apply +// --show-index-info shows the old and new index info for... ... Upon receiving such a patch, if the patch did not apply cleanly to the target tree, the recipient can try to find the matching old objects in her object database and create a temporary tree, apply the patch to that temporary tree, and attempt a 3-way merge between the patched temporary tree and the target tree using the original temporary tree as the common ancestor. The patch lifts the code to compute the hash for an on-filesystem object from update-index.c and makes it available to the diff output routine. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 01 10月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <junio@twinsun.com>
-
- 30 9月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
The core part detected and died upon seeing a corrupted packfile, but did not help the user by telling which packfile is corrupt and how. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 27 9月, 2005 1 次提交
-
-
由 Sven Verdoolaege 提交于
Signed-off-by: NSven Verdoolaege <skimo@kotnet.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 14 9月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
An entry in the alternates file can name a directory relative to the object store it describes. A typical linux-2.6 maintainer repository would have "../../../torvalds/linux-2.6.git/objects" there, because the subsystem maintainer object store would live in /pub/scm/linux/kernel/git/$u/$system.git/objects/ and the object store of Linus tree is in /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/ This unfortunately is different from GIT_ALTERNATE_OBJECT_DIRECTORIES which is relative to the cwd of the running process, but there is no way to make it consistent with the behaviour of the environment variable. The process typically is run in $system.git/ directory for a naked repository, or one level up for a repository with a working tree, so we just define it to be relative to the objects/ directory to be different from either ;-). Later, the dumb transport could be updated to read from info/alternates and make requests for the repository the repository borrows from. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 10 9月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
We have deprecated the old environment variable names for quite a while and now it's time to remove them. Gone are: SHA1_FILE_DIRECTORIES AUTHOR_DATE AUTHOR_EMAIL AUTHOR_NAME COMMIT_AUTHOR_EMAIL COMMIT_AUTHOR_NAME SHA1_FILE_DIRECTORY Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 05 9月, 2005 1 次提交
-
-
由 Peter Hagervall 提交于
Hi. This patch contains the following possible cleanups: * Make some needlessly global functions in local-pull.c static * Change 'char *' to 'const char *' where appropriate Signed-off-by: NPeter Hagervall <hager@cs.umu.se> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 24 8月, 2005 1 次提交
-
-
由 Jason Riedy 提交于
Omitting the first branch in ?: is a GNU extension. Cute, but not supported by other compilers. Replaced mostly by explicit tests. Calls to getenv() simply are repeated on non-GNU compilers. Signed-off-by: NJason Riedy <ejr@cs.berkeley.edu>
-
- 17 8月, 2005 2 次提交
-
-
由 Junio C Hamano 提交于
Yes, using the same format for the file and the environment variable was a big mistake. This uses LF as the path separator, and allows lines that begin with '#' to be comments. ':' is no longer a separator in objects/info/alternates file. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Daniel Barkalow 提交于
Note that the pack file has to be in the usual location if it gets installed later. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 15 8月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
It was a mistake to use GIT_ALTERNATE_OBJECT_DIRECTORIES environment variable to specify what alternate object pools to look for missing objects when working with an object database. It is not a property of the process running the git commands, but a property of the object database that is partial and needs other object pools to complete the set of objects it lacks. This patch allows you to have $GIT_OBJECT_DIRECTORY/info/alternates whose contents is in exactly the same format as the environment variable, to let an object database name alternate object pools it depends on. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 10 8月, 2005 1 次提交
-
-
由 Pavel Roskin 提交于
This patch fixes the only warning reported by gcc 4.0.1 on Fedora Core 4 for x86_64: sha1_file.c:1391: warning: pointer targets in assignment differ in signedness Signed-off-by: NPavel Roskin <proski@gnu.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 09 8月, 2005 2 次提交
-
-
由 Sergey Vlasov 提交于
If the object to write was packed, both its uncompressed and compressed data were leaked. If the object was not packed, its file was not unmapped. [jc: I think it still leaks on the write error path of write_sha1_to_fd(), but that should be fixable in a small separate patch.] Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
When following a reference, read_object_with_reference() did not free the intermediate object data. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 05 8月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
Everybody envies rev-parse, who is the only one that can grok the extended sha1 format. Move the get_extended_sha1() out of rev-parse, rename it to get_sha1() and make it available to everybody else. The one I posted earlier to the list had one bug where it did not handle a name that ends with a digit correctly (it incorrectly tried the "Nth parent" path). This commit fixes it. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 03 8月, 2005 1 次提交
-
-
由 barkalow@iabervon.org 提交于
This causes ssh-pull to request objects in prefetch() and read then in fetch(), such that it reduces the unpipelined round-trip time. This also makes sha1_write_from_fd() support having a buffer of data which it accidentally read from the fd after the object; this was formerly not a problem, because it would always get a short read at the end of an object, because the next object had not been requested. This is no longer true. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 01 8月, 2005 2 次提交
-
-
由 barkalow@iabervon.org 提交于
This adds support for reading an uninstalled index, and installing a pack file that was added while the program was running, as well as functions for determining where to put the file. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
Introduce a new file $GIT_DIR/info/grafts (or $GIT_GRAFT_FILE) which is a list of "fake commit parent records". Each line of this file is a commit ID, followed by parent commit IDs, all 40-byte hex SHA1 separated by a single SP in between. The records override the parent information we would normally read from the commit objects, allowing both adding "fake" parents (i.e. grafting), and pretending as if a commit is not a child of some of its real parents (i.e. cauterizing). Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 30 7月, 2005 1 次提交
-
-
由 Pavel Roskin 提交于
I have reviewed all occurrences of mmap() in git and fixed three types of errors/defects: 1) The result is not checked. 2) The file descriptor is closed if mmap() succeeds, but not when it fails. 3) Various casts applied to -1 are used instead of MAP_FAILED, which is specifically defined to check mmap() return value. [jc: This is a second round of Pavel's patch. He fixed up the problem that close() potentially clobbering the errno from mmap, which the first round had.] Signed-off-by: NPavel Roskin <proski@gnu.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 12 7月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
This reverses the order of object lookup, to check pack index first and then go to the filesystem to find .git/objects/??/ hierarchy. When most of the objects are packed, this saves quite many stat() calls and negative dcache entries; while the price this approach has to pay is negligible, even when most of the objects are outside pack, because checking pack index file is quite cheap. Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 11 7月, 2005 3 次提交
-
-
由 Linus Torvalds 提交于
Very irritating. But "snprintf()" wants "char *", and zlib wants "unsigned char *".
-
由 Daniel Barkalow 提交于
Remove map_sha1_file(), now unused. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
由 Daniel Barkalow 提交于
Add write_sha1_to_fd(), which writes an object to a file descriptor. This includes support for unpacking it and recompressing it. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 09 7月, 2005 2 次提交
-
-
由 Bryan Larsen 提交于
This patch makes the first half of write_sha1_file() and index_fd() externally visible, to allow callers to compute the object ID without actually storing it in the object database. [JC demangled the whitespaces himself because he liked the patch so much, and reworked the interface to index_fd() slightly, taking suggestion from Linus and of his own.] Signed-off-by: NBryan Larsen <bryan.larsen@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
由 Linus Torvalds 提交于
I'm bored with doing it by hand all the time.
-
- 07 7月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
The function write_one_ref() is passed the list of refs received from the other end, which was obtained by directory traversal under $GIT_DIR/refs; this can contain paths other than what git-init-db prepares and would fail to clone when there is such. Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 06 7月, 2005 3 次提交
-
-
由 Junio C Hamano 提交于
The function calls opendir() without a matching closedir(). Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
由 Linus Torvalds 提交于
GIT_DIR=. ends up being what some of the pack senders use, and we sometimes messed up when cleaning up the path, ie a ".//HEAD" was cleaned up into "/HEAD", not "HEAD" like it should be. We should do some other cleanup, and probably also verify that symlinks don't point to outside the git area.
-
由 Linus Torvalds 提交于
"git_path()" returns a static pathname pointer into the git directory using a printf-like format specifier. "head_ref()" works like "for_each_ref()", except for just the HEAD.
-
- 04 7月, 2005 3 次提交
-
-
由 Linus Torvalds 提交于
We'll want this for incremental packing.
-
由 Linus Torvalds 提交于
Mainly making a lot of local functions and variables be marked "static", but there was a "zero as NULL" warning in there too.
-
由 Linus Torvalds 提交于
A couple of bogus "might be used undefined" warnings are avoided by moving the initializations unnecessarily early.
-
- 01 7月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
This implements show_pack_info() function used in verify-pack command when -v flag is used to obtain something like unpack-objects used to give when it was first written. It shows the following for each non-deltified object found in the pack: SHA1 type size offset For deltified objects, it shows this instead: SHA1 type size offset depth base_sha1 In order to get the output in the order that appear in the pack file for debugging purposes, you can do this: $ git-verify-pack -v packfile | sort -n -k 4,4 Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-