summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2005-11-17apply: allow-binary-replacement.Junio C Hamano
A new option, --allow-binary-replacement, is introduced. When you feed a diff that records full SHA1 name of pre- and post-image blob on its index line to git-apply with this option, the post-image blob replaces the path if what you have in the working tree matches the pre-image _and_ post-image blob is already available in the object directory. Later we _might_ want to enhance the diff output to also include the full binary data of the post-image, to make this more useful, but this is good enough for local rebasing application. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-17git-am: --resolved.Junio C Hamano
After failed patch application, you can manually apply the patch (this includes resolving the conflicted merge after git-am falls back to 3-way merge) and run git-update-index on necessary paths to prepare the index file in a shape a successful patch application should have produced. Then re-running git-am --resolved would record the resulting index file along with the commit log information taken from the patch e-mail. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16git-apply: fail if a patch cannot be applied.Junio C Hamano
Recently we fixed 'git-apply --stat' not to barf on a binary differences. But it accidentally broke the error detection when we actually attempt to apply them. This commit fixes the problem and adds test cases. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16git-cvsexportcommit.perl: fix typos in outputKevin Geiss
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16git-cvsexportcommit.perl: exit with non-0 status if patch fails.Kevin Geiss
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16git-cvsexportcommit.perl: use getopts to get binary flagsKevin Geiss
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16git-cvsexportcommit.perl: Fix usage() output.Kevin Geiss
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16Documentation/git-log.txt: trivial typo fix.Alecs King
Signed-off-by: Alecs King <alecsk@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16symref support for import scriptsPavel Roskin
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>
2005-11-16Disallow empty pattern in "git grep"Linus Torvalds
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>
2005-11-16git wrapper: basic fixes.Junio C Hamano
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>
2005-11-16Give python a chance to find "backported" modulesJohannes Schindelin
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>
2005-11-16Fix tests with new git in CJohannes Schindelin
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>
2005-11-16Fix llist_sorted_difference_inplace in git-pack-redundantLukas Sandström
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>
2005-11-16git --help COMMAND brings up the git-COMMAND man-page.Andreas Ericsson
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>
2005-11-16Update git(7) man-page for the C wrapper.Andreas Ericsson
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>
2005-11-16C implementation of the 'git' program, take two.Andreas Ericsson
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>
2005-11-15sha1_file.c::add_packed_git(): fix type mismatch.Junio C Hamano
An object name is 20-byte 'unsigned char', not 'char'. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-15diff: make default rename detection limit configurable.Junio C Hamano
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>
2005-11-15Add config variable core.symrefsonlyJohannes Schindelin
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>
2005-11-15Rework object refs tracking to reduce memory usageSergey Vlasov
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>
2005-11-15git-fsck-objects: Free tree entries after useSergey Vlasov
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>
2005-11-15Fix git(1) link to git-index-packJonas Fonseca
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-15Documentation: do not blindly run 'cat' .git/HEAD, or echo into it.Junio C Hamano
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>
2005-11-15Fix bunch of fd leaks in http-fetchPetr Baudis
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>
2005-11-15git-daemon: --inetd implies --syslogAndreas Ericsson
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>
2005-11-15git-core-foo -> git-foo, except the core packageH. Peter Anvin
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>
2005-11-15Update topo-order test.Junio C Hamano
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>
2005-11-15allow git-update-ref create refs with slashes in namesAlex Riesen
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>
2005-11-15Documentation nitpickingNikolai Weibull
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>
2005-11-15Document a couple of missing command-line options.Nikolai Weibull
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>
2005-11-15Document the -n command-line option to git-unpack-objectsNikolai Weibull
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>
2005-11-15apply: fix binary patch detection.Junio C Hamano
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>
2005-11-14Fix git-rev-list "date order" with --topo-orderLinus Torvalds
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>
2005-11-14git-branch: Mention -d and -D in man-page.Andreas Ericsson
Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-14Merge branch 'svnup' of http://netz.smurf.noris.de/git/gitJunio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-14Depend on asciidoc 7 (at least).Matthias Urlichs
2005-11-14Remove git-rename. git-mv does the sameJosef Weidendorfer
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-14Bugfix: stop if directory already existsJosef Weidendorfer
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>
2005-11-14Separate LDFLAGS and CFLAGS.Junio C Hamano
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>
2005-11-14Merge branch 'svnup' of http://netz.smurf.noris.de/git/gitJunio C Hamano
2005-11-14Remove trailing slashesMatthias Urlichs
SVN dies a messy death when passed a path with trailing slashes.
2005-11-13Rename lost+found to lost-found.Junio C Hamano
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>
2005-11-13Fix compilation warnings in pack-redundant.cKai Ruemmler
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>
2005-11-13Debian: build-depend on libexpat-dev.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-13Split gitk into seperate RPM packageThomas Matysik
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>
2005-11-13Add expat and expat-devel dependencies (for http-push) to RPM spec.Thomas Matysik
Signed-off-by: Thomas Matysik <thomas@matysik.co.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-13Fix fd leak in http-fetchNick Hengeveld
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>
2005-11-13Fix for multiple alternates requests in http-fetchNick Hengeveld
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>
2005-11-12debian packaging: git-cvs needs cvspsMatthias Urlichs