summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* symref support for import scriptsPavel Roskin2005-11-163-8/+13
| | | | | | | Fix git import script not to assume that .git/HEAD is a symlink. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Disallow empty pattern in "git grep"Linus Torvalds2005-11-161-0/+4
| | | | | | | | | | | For some reason I've done a "git grep" twice with no pattern, which is really irritating, since it just grep everything. If I actually wanted that, I could do "git grep ^" or something. So add a "usage" message if the pattern is empty. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git wrapper: basic fixes.Junio C Hamano2005-11-151-56/+98
| | | | | | | | | | | | | | | Updates to fix the nits found during the list discussion. - Lose PATH_TO_MAN; just rely on execlp() to find whereever the "man" command is installed. - Do not randomly chdir(), but concatenate to the current working directory only if the given path is not absolute. - Lose use of glob(); read from exec_path and do sorting ourselves -- it is not that much more work. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Give python a chance to find "backported" modulesJohannes Schindelin2005-11-151-2/+4
| | | | | | | | | | python 2.2.1 is perfectly capable of executing git-merge-recursive, provided that it finds heapq and sets. All you have to do is to steal heapq.py and sets.py from python 2.3 or newer, and drop them in your GIT_PYTHON_PATH. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix tests with new git in CJohannes Schindelin2005-11-151-0/+2
| | | | | | | GIT_EXEC_PATH *has* to be set. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix llist_sorted_difference_inplace in git-pack-redundantLukas Sandström2005-11-151-32/+15
| | | | | | | | | Simplify and actually make llist_sorted_difference_inplace work by using llist_sorted_remove instead of duplicating parts of the code. Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git --help COMMAND brings up the git-COMMAND man-page.Andreas Ericsson2005-11-152-2/+28
| | | | | | | | It's by design a bit stupid (matching ^git rather than ^git-), so as to work with 'gitk' and 'git' as well. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Update git(7) man-page for the C wrapper.Andreas Ericsson2005-11-151-7/+28
| | | | | | | | | | | | The program 'git' now has --exec-path which needs explaining. Renamed old "DESCRIPTION" to "CORE GIT COMMANDS" to make room for "OPTIONS" while following follow some sort of convention. Also updated AUTHORS section to pat my own back a bit. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* C implementation of the 'git' program, take two.Andreas Ericsson2005-11-153-88/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides a C implementation of the 'git' program and introduces support for putting the git-* commands in a directory of their own. It also saves some time on executing those commands in a tight loop and it prints the currently available git commands in a nicely formatted list. The location of the GIT_EXEC_PATH (name discussion's closed, thank gods) can be obtained by running git --exec-path which will hopefully give porcelainistas ample time to adapt their heavy-duty loops to call the core programs directly and thus save the extra fork() / execve() overhead, although that's not really necessary any more. The --exec-path value is prepended to $PATH, so the git-* programs should Just Work without ever requiring any changes to how they call other programs in the suite. Some timing values for 10000 invocations of git-var >&/dev/null: git.sh: 24.194s git.c: 9.044s git-var: 7.377s The git-<tab><tab> behaviour can, along with the someday-to-be-deprecated git-<command> form of invocation, be indefinitely retained by adding the following line to one's .bash_profile or equivalent: PATH=$PATH:$(git --exec-path) Experimental libraries can be used by either setting the environment variable GIT_EXEC_PATH, or by using git --exec-path=/some/experimental/exec-path Relative paths are properly grok'ed as exec-path values. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* sha1_file.c::add_packed_git(): fix type mismatch.Junio C Hamano2005-11-151-1/+1
| | | | | | An object name is 20-byte 'unsigned char', not 'char'. Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff: make default rename detection limit configurable.Junio C Hamano2005-11-155-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A while ago, a rename-detection limit logic was implemented as a response to this thread: http://marc.theaimsgroup.com/?l=git&m=112413080630175 where gitweb was found to be using a lot of time and memory to detect renames on huge commits. git-diff family takes -l<num> flag, and if the number of paths that are rename destination candidates (i.e. new paths with -M, or modified paths with -C) are larger than that number, skips rename/copy detection even when -M or -C is specified on the command line. This commit makes the rename detection limit easier to use. You can have: [diff] renamelimit = 30 in your .git/config file to specify the default rename detection limit. You can override this from the command line; giving 0 means 'unlimited': git diff -M -l0 We might want to change the default behaviour, when you do not have the configuration, to limit it to say 20 paths or so. This would also help the diffstat generation after a big 'git pull'. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add config variable core.symrefsonlyJohannes Schindelin2005-11-155-4/+14
| | | | | | | | | | | | | | | This allows you to force git to avoid symlinks for refs. Just add something like [core] symrefsonly = true to .git/config. Don´t forget to "git checkout your_branch", or it does not do anything... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Rework object refs tracking to reduce memory usageSergey Vlasov2005-11-157-42/+116
| | | | | | | | | | | | | Store pointers to referenced objects in a variable sized array instead of linked list. This cuts down memory usage of utilities which use object references; e.g., git-fsck-objects --full on the git.git repository consumes about 2 MB of memory tracked by Massif instead of 7 MB before the change. Object refs are still the biggest consumer of memory (57%), but the malloc overhead for a single block instead of a linked list is substantially smaller. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-fsck-objects: Free tree entries after useSergey Vlasov2005-11-151-0/+7
| | | | | | | | | | The Massif tool of Valgrind revealed that parsed tree entries occupy more than 60% of memory allocated by git-fsck-objects. These entries can be freed immediately after use, which significantly decreases memory consumption. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix git(1) link to git-index-packJonas Fonseca2005-11-151-1/+1
| | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: do not blindly run 'cat' .git/HEAD, or echo into it.Junio C Hamano2005-11-157-13/+14
| | | | | | | | | Many places in the documentation we still talked about reading what commit is recorded in .git/HEAD or writing the new head information into it, both assuming .git/HEAD is a symlink. That is not necessarily so. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix bunch of fd leaks in http-fetchPetr Baudis2005-11-151-2/+14
| | | | | | | | | | | | | The current http-fetch is rather careless about fd leakage, causing problems while fetching large repositories. This patch does not reserve exhaustiveness, but I covered everything I spotted. I also left some safeguards in place in case I missed something, so that we get to know, sooner or later. Reported by Becky Bruce <becky.bruce@freescale.com>. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-daemon: --inetd implies --syslogAndreas Ericsson2005-11-152-3/+4
| | | | | | | Otherwise nothing is logged anywhere, which is a Bad Thing. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-core-foo -> git-foo, except the core packageH. Peter Anvin2005-11-152-13/+37
| | | | | | | | | | | | | This patch renames the tarball "git" rather than "git-core", and changes the names of various packages from git-core-foo to git-foo. git-core is still the true core package; an empty RPM package named "git" pulls in ALL the git packages -- this makes updates work correctly, and allows "yum install git" to do the obvious thing. It also renames the git-(core-)tk package to gitk. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Update topo-order test.Junio C Hamano2005-11-141-15/+15
| | | | | | | | The recently we updated rev-list --topo-order to show the heads in date order, but we had a test that expected to see the old behaviour. Signed-off-by: Junio C Hamano <junkio@cox.net>
* allow git-update-ref create refs with slashes in namesAlex Riesen2005-11-143-4/+14
| | | | | | | | | | Make git-update-ref create references with slashes in them. git-branch and git-checkout already support such reference names. git-branch can use git-update-ref to create the references in a more formal manner now. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation nitpickingNikolai Weibull2005-11-142-2/+2
| | | | | | | This patch fixes some small problems with the documentation. Signed-off-by: Nikolai Weibull <nikolai@bitwi.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document a couple of missing command-line options.Nikolai Weibull2005-11-143-5/+15
| | | | | | | This patch adds documentation to quite a few command-line options. Signed-off-by: Nikolai Weibull <nikolai@bitwi.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document the -n command-line option to git-unpack-objectsNikolai Weibull2005-11-142-2/+6
| | | | | | | | This patch documents the -n command-line option to git-unpack-objects, as it was previously undocumented. Signed-off-by: Nikolai Weibull <nikolai@bitwi.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* apply: fix binary patch detection.Junio C Hamano2005-11-141-3/+4
| | | | | | | | | | The comparison to find "Binary files " string was looking at a wrong place when offset != 0. Also, we may have the full 40-byte textual sha1 on the index line; two off-by-one errors prevented it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix git-rev-list "date order" with --topo-orderLinus Torvalds2005-11-141-2/+3
| | | | | | | | | | | | | | | | | | | | This fixes git-rev-list so that when there are multiple branches, we still sort the heads in proper approximate date order even when sorting the output topologically. This makes things like gitk --all -d work sanely and show the branches in date order (where "date order" is obviously modified by the paren-child dependency requirements of the topological sort). The trivial fix is to just build the "work" list in date order rather than inserting the new work entries at the beginning. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-branch: Mention -d and -D in man-page.Andreas Ericsson2005-11-141-4/+11
| | | | | Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'svnup' of http://netz.smurf.noris.de/git/gitJunio C Hamano2005-11-141-1/+1
|\ | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Depend on asciidoc 7 (at least).Matthias Urlichs2005-11-141-1/+1
| |
* | Remove git-rename. git-mv does the sameJosef Weidendorfer2005-11-145-107/+1
| | | | | | | | | | Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Bugfix: stop if directory already existsJosef Weidendorfer2005-11-141-2/+2
| | | | | | | | | | | | | | | | | | Fix a typo: We do not want to run the directory as command, and want to terminate if the directory exists Additionally, update the usage message Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Separate LDFLAGS and CFLAGS.Junio C Hamano2005-11-141-9/+20
| | | | | | | | | | | | | | | | Stuffing -L flag and friends meant for the linking phase into ALL_CFLAGS is not right; honor LDFLAGS and introduce ALL_LDFLAGS to separate them out. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'svnup' of http://netz.smurf.noris.de/git/gitJunio C Hamano2005-11-142-2/+7
|\ \ | |/
| * Remove trailing slashesMatthias Urlichs2005-11-141-1/+6
| | | | | | | | SVN dies a messy death when passed a path with trailing slashes.
| * debian packaging: git-cvs needs cvspsMatthias Urlichs2005-11-121-1/+1
| |
* | Rename lost+found to lost-found.Junio C Hamano2005-11-135-7/+7
| | | | | | | | | | | | | | | | Because we use "lost-found" as the directory name to hold dangling object names, it is confusing to call the command git-lost+found, although it makes sense and is even cute ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix compilation warnings in pack-redundant.cKai Ruemmler2005-11-131-7/+8
| | | | | | | | | | | | | | | | This fixes compilation warnings where "%ld" was used to print values of type size_t. Signed-off-by: Kai Ruemmler <kai.ruemmler@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Debian: build-depend on libexpat-dev.Junio C Hamano2005-11-132-1/+7
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Split gitk into seperate RPM packageThomas Matysik2005-11-131-3/+17
| | | | | | | | | | | | | | | | | | | | I don't want to have to install x11-libs and all it's dependencies on my headless machines, so this patch splits gitk out of the RPM. The .deb already appears to have gitk split out. Signed-off-by: Thomas Matysik <thomas@matysik.co.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Add expat and expat-devel dependencies (for http-push) to RPM spec.Thomas Matysik2005-11-131-2/+2
| | | | | | | | | | Signed-off-by: Thomas Matysik <thomas@matysik.co.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix fd leak in http-fetchNick Hengeveld2005-11-121-0/+2
| | | | | | | | | | | | | | | | Added a call to finish_request to clean up resources if the server returned a 404 and there are no alternates left to try. Signed-off-by: Nick Hengeveld <nickh@reactrix.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix for multiple alternates requests in http-fetchNick Hengeveld2005-11-121-61/+117
|/ | | | | | | | | Stop additional alternates requests from starting if one is already in progress. This adds an optional callback which is processed after a slot has finished running. Signed-off-by: Nick Hengeveld <nickh@reactrix.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Ignore built git-lost+found.Junio C Hamano2005-11-111-0/+1
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: asciidoc sources are utf-8Junio C Hamano2005-11-112-3/+3
| | | | | | | | | | | git-pack-redundant documentation was encoded in latin1, which caused asciidoc to barf, which expected to see utf-8. Run tcs to re-encode it in utf-8. Also just for fun try my name in Japanese in git-lost+found documentation ;-) Signed-off-by: Junio C Hamano <junkio@cox.net>
* Rename .git/lost+found to .git/lost-found.Junio C Hamano2005-11-112-5/+5
| | | | | | | | | | Just to avoid confusion that scripts poorly written by somebody else ;-) might mistake this as a mount point, or backup tools ignoring the directory. The latter is probably not a big loss, however, considering that this directory's contents are to be used while fresh anyway. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-lost+foundJunio C Hamano2005-11-114-1/+106
| | | | | | This command helps you resurrect accidentally lost tags and commits. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-prune: prune redundant packsJunio C Hamano2005-11-111-0/+11
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make git-pack-redundant consider alt-odbsLukas_Sandström2005-11-113-62/+106
| | | | | | | | | | | | | | This patch changes git-pack-redundant so that packfiles in alternate object directories also are considered when deciding which objects are redundant. This functionality is controlled by the flag '--alt-odb'. Also convert the other flags to the long form, and update docs and git-repack accordingly. Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Rename git-pack-intersect to git-pack-redundantLukas_Sandström2005-11-115-11/+13
| | | | | | | | | | | This patch renames git-pack-intersect to git-pack-redundant as suggested by Petr Baudis. The new name reflects what the program does, rather than how it does it. Also fix a small argument parsing bug. Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make git-repack use git-pack-intersect.Lukas_Sandström2005-11-111-18/+12
| | | | | Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>