- 24 9月, 2005 7 次提交
-
-
由 Sergey Vlasov 提交于
"git-local-fetch -s" did not work with a packed repository, because symlink() happily created a link to a non-existing object file, therefore fetch_file() always returned success, and fetch_pack() was not called. Fixed by calling stat() before symlink() to ensure the file really exists. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
After open() failure, copy_file() called close(ifd) with ifd == -1 (harmless, but causes Valgrind noise). The same thing was possible for the destination file descriptor. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
setup_indices() did not check the return value of opendir(), and did not have a corresponding closedir() call. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
When freeing a tree entry, must free its name too. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
The fetch code does not need object ref lists; by disabling them we can save some time and memory. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Robert Watson 提交于
Document the best way to show the change introduced by a commit, based on the suggestion by Linus on the list. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 23 9月, 2005 10 次提交
-
-
由 Junio C Hamano 提交于
When making changes to different files (i.e. dirty working tree) and committing logically separate changes in groups, often it is necessary to run 'git diff --cached HEAD' to make sure that the changes being committed makes sense. Saying 'git diff --cached' by mistake gives rather uninformative error message from git-diff-files complaining it does not understand --cached flag. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
The call to parse_object() in process() is not actually needed - if the object type is unknown, parse_object() will be called by loop(); if the type is known, the object will be parsed by the appropriate process_*() function. After this change blobs which exist locally are no longer parsed, which gives about 2x CPU usage improvement; the downside is that there will be no warnings for existing corrupted blobs, but detecting such corruption is the job of git-fsck-objects, not the fetch programs. Newly fetched objects are still checked for corruption in http-fetch.c and ssh-fetch.c (local-fetch.c does not seem to do it, but the removed parse_object() call would not be reached for new objects anyway). Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
Remove holes left after deleting flags, and use shifts to emphasize that flags are single bits. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
If the SEEN flag was not set, the TO_SCAN flag cannot be set, therefore testing it is pointless. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
It does not matter if we call prefetch() or set the TO_SCAN flag before or after adding the object to process_queue. However, doing it before object_list_insert() allows us to kill 3 lines of duplicated code. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
The TO_FETCH flag also became redundant after adding the SEEN flag - it was set and checked in process() to prevent adding the same object to process_queue multiple times, but now SEEN guards against this. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
After adding the SEEN flag, the SCANNED flag became obviously redundant - each object can get into process_queue through process() only once, and therefore multiple calls to process_object() for the same object are not possible. Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
The process() function is very often called multiple times for the same object (because lots of trees refer to the same blobs), but did not have a fast check for this, therefore a lot of useless calls to has_sha1_file() and parse_object() were made before discovering that nothing needs to be done. This patch adds the SEEN flag which is used in process() to make it look at each object only once. When testing git-local-fetch on the repository of GIT, this gives a 14x improvement in CPU usage (mainly because the redundant calls to parse_object() are now avoided - parse_object() always unpacks and parses the object data, even if it was already parsed before). Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Sergey Vlasov 提交于
In all places where process() is called except the one in pull() (which is executed only once) the pointer to the object is already available, so pass it as the argument to process() instead of sha1 and avoid an unneeded call to lookup_object_type(). Signed-off-by: NSergey Vlasov <vsu@altlinux.ru> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
When we check the optional objects/info/alternates file at the remote repository, we forgot to really squelch error message from rsync. Not having that file is not a crime. Signed-off-by: NJunio C Hamano <junkio@cox.net> (cherry picked from 89d844d0 commit)
-
- 22 9月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
Randal L. Schwartz noticed that 'make install' does not rebuild what is installed. Make the 'install' rule depend on 'man'. I noticed also 'touch' of the source files were used to express include dependencies, which is a no-no. Rewrite it to do dependencies properly, and add missing include dependencies while we are at it. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 21 9月, 2005 2 次提交
-
-
由 Junio C Hamano 提交于
Unlike write_sha1_file() that tries to create the object file in a temporary location and then move it to the final location, fetch_object could have been interrupted in the middle, leaving a corrupt file. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Linus Torvalds 提交于
get_sha1() would not do sha1 completion of short SHA1's when they were part of a more complex expression. So doing git-rev-parse 72713283^ would work, and return 87c6aeb4. But using the shorthand version git-rev-list 72713^ wouldn't work. Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 20 9月, 2005 5 次提交
-
-
由 Junio C Hamano 提交于
so people without the latest Python could run merge-recursive. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
We may end up trying to print a commit we do not actually have but we know about its existence only because another commit we do have refers to it. Signed-off-by: NJunio C Hamano <junkio@cox.net> (cherry picked from b204feab9371040982d2c60611925e7693106c84 commit)
-
由 Petr Baudis 提交于
The base target directory for the templates copying was initialized to git_dir, but git_dir[len] is not zero but / at the time we do the initialization. This is not what we want for our target directory string since we pass it to mkdir(), so make it zero-terminated manually. Signed-off-by: NPetr Baudis <pasky@suse.cz> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Patrick Mauritz 提交于
We sometimes do not install git-send-email nor git-http-pull; do not unconditionally create symlinks to them. Signed-off-by: NPatrick Mauritz <oxygene@studentenbude.ath.cx> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Linus Torvalds 提交于
The target to check out does not need to be a branch. The _result_ of the checkout needs to be a branch. Don't confuse the two, and then insult the user. Insulting is ok, but I personally get really pissed off is a tool is both confused and insulting. At least be _correct_ and insulting. Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 19 9月, 2005 9 次提交
-
-
由 Linus Torvalds 提交于
Some C libraries lack strcasestr(); add a stupid replacement to help folks with such. [jc: original Linus posting, updated with his "also need <ctype.h>", updated further with a fix from Joachim B Haga <cjhaga@fys.uio.no>"] Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Petr Baudis 提交于
This makes git-update-index error reporting much less confusing. The user will know what went wrong with better precision, and will be given a hopefully less confusing advice. Signed-off-by: NPetr Baudis <pasky@suse.cz> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Linus Torvalds 提交于
This fixes everybodys favourite complaint about "git add", namely that it doesn't take directories. We use "git-ls-files --others" to generate an arbitrary list of filenames, and thus also automatically honor ignore-files while we're at it. Side note: there's a lot of room for improvement here. In particular, if we have a long list of filenames (importing a big archive), this will just do a big stupid for-loop and add them one at a time. Maybe it should use generate-list | xargs -0 git-update-idex --add -- instead. Also, I think we should have a default ignore list if we don't find a .git/info/exclude file. Ignoring "*.o" and ".*" by default would probably be the right thing to do. But I think this is a good first step. Use the "-n" flag to just show the list of files to be added without adding them. Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Linus Torvalds 提交于
Especially when you're deep inside the git repository, it's not all that trivial for scripts to figure out where GIT_DIR is if it isn't set. So add a flag to git-rev-parse to show where it is, since it will have figured it out anyway. Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Daniel Barkalow 提交于
This allows the remote repository to refer to additional repositories in a file objects/info/http-alternates or objects/info/alternates. Each line may be: a relative path, starting with ../, to get from the objects directory of the starting repository to the objects directory of the added repository. an absolute path of the objects directory of the added repository (on the same server). (only in http-alternates) a full URL of the objects directory of the added repository. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
Bugfix for the previous one. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 18 9月, 2005 6 次提交
-
-
由 Junio C Hamano 提交于
-
由 Junio C Hamano 提交于
The recent safety check to trust only the commits we have made things impossibly slow and turn out to waste a lot of memory. This commit fixes it with the following improvements: - mark already scanned objects and avoid rescanning the same object again; - free the tree entries when we have scanned the tree entries; this is the same as b0d8923e which reduced memory usage by rev-list; - plug memory leak from the object_list dequeuing code; - use the process_queue not just for fetching but for scanning, to make things tail recursive to avoid deep recursion; the deep recursion was especially prominent when we cloned a big pack. - avoid has_sha1_file() call when we already know we do not have that object. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
Using "git repack -a -d" can destroy your git archive if you use it twice in succession, because the new pack can be called the same as the old pack. Found by Linus. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
As a convenience measure, 'bisect bad' or 'bisect good' automatically does 'bisect next' when it knows it can, but the result of that test to see if it can was leaking through as the exit code from the whole thing, which was bad. Noticed by Anton Blanchard. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Daniel Barkalow 提交于
This tries .../objects/info/http-alternates and then .../objects/info/alternates, looking for a file which specifies where else to download objects and packs from. It currently only supports absolute paths, and doesn't support full URLs. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
I do not know why it was spelled git-rev-tree when I meant to say git-read-tree, but the typo was left since day one. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-