summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2005-09-25GIT v0.99.7dLibravatar Junio C Hamano2-1/+7
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-25Merge branch 'fixes'Libravatar Junio C Hamano2-2/+15
2005-09-24show-branch: fix commit naming breakage.Libravatar Junio C Hamano1-1/+14
It was ignoring the generation number of the commit when naming 2nd and later parents, showing "(linus^n)^2" for any <n> incorrectly as "linus^2". Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24git-grep: fix 'git grep -e $pattern' handlingLibravatar Junio C Hamano1-1/+1
People typically say 'grep -e $pattern' because $pattern has a leading dash which would be mistaken as a grep flag. Make sure we pass -e in front of $pattern when we invoke grep. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24GIT 0.99.7cLibravatar Junio C Hamano2-1/+7
Contains the following post-0.99.7b fixes: - rsh.c string termination fix by H. Peter Anvin - further fetch fixes by Sergey Vlasov - diff-tree documentation by Robert Watson. - 'git diff --cached' synonymous to 'git diff --cached HEAD'. - subprocess.py licensing status clarification. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-24Really ignore generated distribution material.Libravatar Junio C Hamano1-4/+5
Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from e558e33b7bdb4a7c633bedd1606f7dd7ef912933 commit)
2005-09-23Merge 'fixes' branchLibravatar Junio C Hamano7-40/+62
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23Further clarify licensing status of compat/subprocess.py.Libravatar Junio C Hamano1-20/+4
PSF license explicitly states the files in Python distribution is compatible with GPL, and upstream clarified the licensing terms by shortening its file header. This version is a verbatim copy from release24-maint branch form Python CVS. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] rsh.c unterminated stringLibravatar H. Peter Anvin1-5/+5
The change I made to rsh.c would leave the string unterminated under certain conditions, which unfortunately always applied! This patch fixes this. For some reason this never bit on i386 or ppc, but bit me on x86-64. Fix situation where the buffer was not properly null-terminated. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] git-local-fetch: Avoid confusing error messages on packed repositoriesLibravatar Sergey Vlasov1-5/+12
If the source repository was packed, and git-local-fetch needed to fetch a pack file, it spewed a misleading error message about not being able to find the unpacked object. Fixed by adding the warn_if_not_exists argument to copy_file(), which controls printing of error messages in case the source file does not exist. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] Fix "git-local-fetch -s" with packed source repositoryLibravatar Sergey Vlasov1-3/+11
"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: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] git-local-fetch: Avoid calling close(-1)Libravatar Sergey Vlasov1-2/+4
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: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] git-local-fetch: Fix error checking and leak in setup_indices()Libravatar Sergey Vlasov1-0/+3
setup_indices() did not check the return value of opendir(), and did not have a corresponding closedir() call. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] fetch.c: Plug memory leak in process_tree()Libravatar Sergey Vlasov1-0/+1
When freeing a tree entry, must free its name too. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] fetch.c: Do not build object ref listsLibravatar Sergey Vlasov1-0/+1
The fetch code does not need object ref lists; by disabling them we can save some time and memory. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] document command to show diff of a commitLibravatar Robert Watson1-1/+4
Document the best way to show the change introduced by a commit, based on the suggestion by Linus on the list. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23Ignore a bit more generated files.Libravatar Junio C Hamano1-0/+4
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23Make 'git diff --cached' synonymous to 'git diff --cached HEAD'.Libravatar Junio C Hamano1-1/+13
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: Junio C Hamano <junkio@cox.net>
2005-09-22GIT 0.99.7bLibravatar Junio C Hamano2-1/+7
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22Merge branch 'fixes'Libravatar Junio C Hamano5-41/+53
2005-09-22[PATCH] fetch.c: Remove call to parse_object() from process()Libravatar Sergey Vlasov1-1/+0
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: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22[PATCH] fetch.c: Clean up object flag definitionsLibravatar Sergey Vlasov1-3/+3
Remove holes left after deleting flags, and use shifts to emphasize that flags are single bits. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22[PATCH] fetch.c: Remove redundant test of TO_SCAN in process()Libravatar Sergey Vlasov1-2/+0
If the SEEN flag was not set, the TO_SCAN flag cannot be set, therefore testing it is pointless. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22[PATCH] fetch.c: Remove some duplicated code in process()Libravatar Sergey Vlasov1-8/+5
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: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22[PATCH] fetch.c: Remove redundant TO_FETCH flagLibravatar Sergey Vlasov1-3/+1
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: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22[PATCH] fetch.c: Remove redundant SCANNED flagLibravatar Sergey Vlasov1-6/+1
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: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22[PATCH] fetch.c: Make process() look at each object only onceLibravatar Sergey Vlasov1-0/+5
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: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22[PATCH] fetch.c: Remove useless lookup_object_type() call in process()Libravatar Sergey Vlasov1-13/+10
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: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-22Do not give alarming error message from rsync in fetch and clone.Libravatar Junio C Hamano2-3/+5
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: Junio C Hamano <junkio@cox.net> (cherry picked from 89d844d084f14bc9506f63cd3c9aa44b21b49067 commit)
2005-09-21Fix documentation dependency.Libravatar Junio C Hamano1-3/+5
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: Junio C Hamano <junkio@cox.net>
2005-09-21Make object creation in http fetch a bit safer.Libravatar Junio C Hamano1-5/+24
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: Junio C Hamano <junkio@cox.net>
2005-09-21Clarify dual license status of subprocess.py file.Libravatar Junio C Hamano1-0/+3
The author of the file we stole from Python 2.4 distribution, Peter Astrand <astrand@lysator.liu.se>, OK'ed to add this at the end of the licensing terms section of the file: Use of this file within git is permitted under GPLv2. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-21Merge branch 'fixes'Libravatar Junio C Hamano1-7/+5
2005-09-20Fix extended short SHA1 name completionLibravatar Linus Torvalds1-7/+5
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 727132834e6be48a93c1bd6458a29d474ce7d5d5^ would work, and return 87c6aeb4efdd4355918d127a91bd0adc5a02f8ff. But using the shorthand version git-rev-list 72713^ wouldn't work. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-19GIT 0.99.7aLibravatar Junio C Hamano2-1/+7
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-19Ship our own copy of subprocess.pyLibravatar Junio C Hamano4-9/+1176
so people without the latest Python could run merge-recursive. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-19show-branch: Be nicer when running in a corrupt repository.Libravatar Junio C Hamano1-2/+5
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: Junio C Hamano <junkio@cox.net> (cherry picked from b204feab9371040982d2c60611925e7693106c84 commit)
2005-09-19[PATCH] Fix git-init-db creating crap directories.Libravatar Petr Baudis1-0/+1
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: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-19[PATCH] Do not install compatibility symlink for what we do not installLibravatar Patrick Mauritz1-0/+2
We sometimes do not install git-send-email nor git-http-pull; do not unconditionally create symlinks to them. Signed-off-by: Patrick Mauritz <oxygene@studentenbude.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-19[PATCH] Remove total confusion from "git checkout"Libravatar Linus Torvalds1-1/+1
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: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-19[PATCH] strcasestr compatibility replacementLibravatar Linus Torvalds2-0/+29
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: Junio C Hamano <junkio@cox.net>
2005-09-18GIT 0.99.7Libravatar Junio C Hamano2-1/+7
2005-09-18Arrgh -- another asciidoc caret workaround.Libravatar Junio C Hamano1-1/+2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-18[PATCH] Improve git-update-index error reportingLibravatar Petr Baudis1-11/+25
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: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-18[PATCH] Improved "git add"Libravatar Linus Torvalds1-1/+31
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: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-18[PATCH] Add "--git-dir" flag to git-rev-parseLibravatar Linus Torvalds1-0/+16
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: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-18[PATCH] Support alternates and http-alternates in http-fetchLibravatar Daniel Barkalow1-7/+38
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: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-18Document extended SHA1 used by git-rev-parse.Libravatar Junio C Hamano1-0/+34
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-18fetch() assumes we do not have the object.Libravatar Junio C Hamano1-1/+1
Bugfix for the previous one. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-18Merge branch 'master' of .Libravatar Junio C Hamano49-781/+640