aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * | [PATCH] rsh.c unterminated stringH. Peter Anvin2005-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] git-local-fetch: Avoid confusing error messages on packed repositoriesSergey Vlasov2005-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] Fix "git-local-fetch -s" with packed source repositorySergey Vlasov2005-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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>
| * | [PATCH] git-local-fetch: Avoid calling close(-1)Sergey Vlasov2005-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] git-local-fetch: Fix error checking and leak in setup_indices()Sergey Vlasov2005-09-23
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Plug memory leak in process_tree()Sergey Vlasov2005-09-23
| | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Do not build object ref listsSergey Vlasov2005-09-23
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] document command to show diff of a commitRobert Watson2005-09-23
| | | | | | | | | | | | | | | | | | | | | 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>
| * | Ignore a bit more generated files.Junio C Hamano2005-09-23
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'fixes'Junio C Hamano2005-09-23
|\ \ \ | |/ /
| * | Make 'git diff --cached' synonymous to 'git diff --cached HEAD'.Junio C Hamano2005-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Remove call to parse_object() from process()Sergey Vlasov2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Clean up object flag definitionsSergey Vlasov2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Remove redundant test of TO_SCAN in process()Sergey Vlasov2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Remove some duplicated code in process()Sergey Vlasov2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Remove redundant TO_FETCH flagSergey Vlasov2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Remove redundant SCANNED flagSergey Vlasov2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Make process() look at each object only onceSergey Vlasov2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | [PATCH] fetch.c: Remove useless lookup_object_type() call in process()Sergey Vlasov2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Do not give alarming error message from rsync in fetch and clone.Junio C Hamano2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | [PATCH] Retitle 'inspecting what happened' section.Jon Loeliger2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the tutorial, there is a section entitled "Checking it out" that shows how to use diff log and whatchanged to insect some of the repository state. As the phrase "checkout" ususally carries some baggage WRT other revision control mechanism, I suggest that we re-title this section something like "Inspecting Changes". Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Prettyprint octopus merge message.Junio C Hamano2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | Including the current branch in the list of heads being merged was not a good idea, so drop it. And shorten the message by grouping branches and tags together to form a single line. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | [PATCH] Verbose git-daemon loggingPetr Baudis2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes git-daemon --verbose log some useful things on stderr - in particular connects, disconnects and upload requests, and in such a way to be able to trace a particular session. Some more errors are now also logged (even when --verbose is not passed). It is still not perfect since messages produced by the non-daemon-specific code are obviously not formatted properly. [jc: With minor fix up in the log line truncation, and use of write(2) as suggested by Linus.] Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Retire diff-helper.Junio C Hamano2005-09-22
| | | | | | | | | | | | | | | | | | | | | The textual diff generation with built-in '-p' in diff-* brothers has proven to be useful enough that git-diff-helper outlived its usefulness. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Retire rev-tree.Junio C Hamano2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | Some old scripts might still use git-rev-tree, but it really is clearly inferior in every way to git-rev-list that such scripts should be fixed anyway. Fixing them should be pretty easy. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Retire git-export.Junio C Hamano2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-export was done as a concept example on how easy it is to export the git data to something else. It's much less powerful than any number of trivial one-liner scripts now, and real exporters would not ever use git-export. It's obviously much less powerful than "git-whatchanged", or just about any combination of git-rev-list + git-diff-tree. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | [PATCH] Fix strange timezone handlingLinus Torvalds2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We generate the ASCII representation of our internal date representation ("seconds since 1970, UTC + timezone information") in two different places. One of them uses the stupid and obvious way to make sure that it gets the sexagecimal representation right for negative timezones even if they might not be exact hours, and the other one depends on the modulus operator always matching the sign of argument. Hey, the clever one works. And C90 even specifies that behaviour. But I had to think about it for a while when I was re-visiting this area, and even if I didn't have to, it's kind of strange to have two different ways to print out the same data format. So use a common helper for this. And select the stupid and straighforward way. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Revert "Use git-merge instead of git-resolve in git-pull."Junio C Hamano2005-09-21
| | | | | | | | | | | | This reverts f887564ab72e107bcdee3ba83c91e2bb4ae13ca7 commit.
* | | Revert "Make Octopus merge message a bit nicer."Junio C Hamano2005-09-21
| | | | | | | | | | | | This reverts 63f1aa6c72c46928f1b6959437aed4becbc42ff3 commit.
* | | [PATCH] fetch.c: Remove call to parse_object() from process()Sergey Vlasov2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [PATCH] fetch.c: Clean up object flag definitionsSergey Vlasov2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [PATCH] fetch.c: Remove redundant test of TO_SCAN in process()Sergey Vlasov2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [PATCH] fetch.c: Remove some duplicated code in process()Sergey Vlasov2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [PATCH] fetch.c: Remove redundant TO_FETCH flagSergey Vlasov2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [PATCH] fetch.c: Remove redundant SCANNED flagSergey Vlasov2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [PATCH] fetch.c: Make process() look at each object only onceSergey Vlasov2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [PATCH] fetch.c: Remove useless lookup_object_type() call in process()Sergey Vlasov2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'fixes'Junio C Hamano2005-09-21
|\ \ \ | |/ /
| * | Fix documentation dependency.Junio C Hamano2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Make object creation in http fetch a bit safer.Junio C Hamano2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Clarify dual license status of subprocess.py file.Junio C Hamano2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from 089f20dce19711d34f5383ee289a9b1fbd3f3307 commit)
* | | Update tutorial with Octopus usage.Junio C Hamano2005-09-21
| | | | | | | | | | | | | | | | | | | | | Making an Octopus is simply a natural extension of merging just one branch into the current branch. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Make Octopus merge message a bit nicer.Junio C Hamano2005-09-20
| | | | | | | | | | | | | | | | | | | | | Linus says that 'of .' to mean the commits came from the local repository was too confusing and ugly -- I tend to agree with him. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Use git-merge instead of git-resolve in git-pull.Junio C Hamano2005-09-20
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Make time-based commit filtering work with topological ordering.Linus Torvalds2005-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The trick is to consider the time-based filtering a limiter, the same way we do for release ranges. That means that the time-based filtering runs _before_ the topological sorting, which makes it meaningful again. It also simplifies the code logic. This makes "gitk" useful with time ranges. [ Second version: --merge-order now unaffected by the re-org ] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | [PATCH] Teach "git-rev-parse" about date-based cut-offsLinus Torvalds2005-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the options "--since=date" and "--before=date" to git-rev-parse, which knows how to translate them into seconds since the epoch for git-rev-list. With this, you can do git log --since="2 weeks ago" or git log --until=yesterday to show the commits that have happened in the last two weeks or are older than 24 hours, respectively. The flags "--after=" and "--before" are synonyms for --since and --until, and you can combine them, so git log --after="Aug 5" --before="Aug 10" is a valid (but strange) thing to do. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | [PATCH] ARM optimized SHA1 implementationNicolas Pitre2005-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is my ARM assembly SHA1 implementation for GIT. It is approximately 50% faster than the generic C version. On an XScale processor running at 400MHz: generic C version: 9.8 MB/s my version: 14.5 MB/s It's not that I expect a lot of big GIT users on ARM, but I stillknow about one important ARM user that might benefit from it, and writing that code was fun. I also reworked the makefile a bit so any optimized SHA1 implementations is used regardless of whether NO_OPENSSL is defined or not. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | [PATCH] Make the git-fsck-objects diagnostics more usefulPetr Baudis2005-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Actually report what exactly is wrong with the object, instead of an ambiguous 'bad sha1 file' or such. In places where we already do, unify the format and clean the messages up. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Do not give alarming error message from rsync in fetch and clone.Junio C Hamano2005-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [PATCH] Return proper error valud from "parse_date()"Linus Torvalds2005-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now we don't return any error value at all from parse_date(), and if we can't parse it, we just silently leave the result buffer unchanged. That's fine for the current user, which will always default to the current date, but it's a crappy interface, and we might well be better off with an error message rather than just the default date. So let's change the thing to return a negative value if an error occurs, and the length of the result otherwise (snprintf behaviour: if the buffer is too small, it returns how big it _would_ have been). [ I started looking at this in case we could support date-based revision names. Looks ugly. Would have to parse relative dates.. ] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>