summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in test comment.Junio C Hamano2005-09-171-1/+1
| | | | | | | 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: Junio C Hamano <junkio@cox.net>
* [PATCH] getdomainname should be usable on SunOS with -lnslJunio C Hamano2005-09-173-4/+6
| | | | | | | Jason Riedy suggests that we should be able to use getdomainname if we properly specify which libraries to link. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Make "git shortlog" understand raw logsLinus Torvalds2005-09-171-1/+1
| | | | | | | | | This is a nicer fix for git-shortlog being unable to handle the raw log format. Just use a more permissive regexp instead of doing two nearly identical ones. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Fix "git-rev-list" revision range parsingLinus Torvalds2005-09-171-1/+3
| | | | | | | | | | | | There were two bugs in there: - if the range didn't end up working, we restored the '.' character in the wrong place. - an empty end-of-range should be interpreted as HEAD. See rev-parse.c for the reference implementation of this. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add git-send-email to .gitignoreJunio C Hamano2005-09-171-0/+1
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach rsync transport about alternates.Junio C Hamano2005-09-173-5/+68
| | | | | | | | | | | | | | For local operations and downloading and uploading via git aware protocols, use of $GIT_OBJECT_DIRECTORY/info/alternates is recommended on the server side for big projects that are derived from another one (like Linux kernel). However, dumb protocols and rsync transport needs to resolve this on the client end, which we did not bother doing until this week. I noticed we use "rsync -z" but most of our payload is already compressed, which was not quite right. This commit also fixes it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Avoid building object ref lists when not neededLinus Torvalds2005-09-163-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The object parsing code builds a generic "this object references that object" because doing a full connectivity check for fsck requires it. However, nothing else really needs it, and it's quite expensive for git-rev-list that can have tons of objects in flight. So, exactly like the commit buffer save thing, add a global flag to disable it, and use it in git-rev-list. Before: $ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 12.28user 0.29system 0:12.57elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+26718minor)pagefaults 0swaps 59124 After this change: $ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 10.33user 0.18system 0:10.54elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+18509minor)pagefaults 0swaps 59124 and note how the number of pages touched by git-rev-list for this particular object list has shrunk from 26,718 (104 MB) to 18,509 (72 MB). Calculating the total object difference between two git revisions is still clearly the most expensive git operation (both in memory and CPU time), but it's now less than 40% of what it used to be. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Improve git-rev-list memory usage furtherLinus Torvalds2005-09-161-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids keeping tree entries around, and free's them as it traverses the list. This avoids building up a huge memory footprint just for these small but very common allocations. Before: $ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 11.65user 0.38system 0:12.65elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+42934minor)pagefaults 0swaps 59124 After: $ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 12.28user 0.29system 0:12.57elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+26718minor)pagefaults 0swaps 59124 Note how the minor fault numbers - which ends up being how many pages we needed to map - go down from 42934 (167 MB) to 26718 (104 MB). That is: Before: 42934 minor pagefaults After: 26718 minor pagefaults This is all in _addition_ to the previous fixes. It used to be ~48,000 pagefaults. That's still a honking big memory footprint, but it's about half of what it was just a day or two ago (and this is the object list for a pretty big update - almost 60,000 objects. Smaller updates need less memory). Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] fetch.c: cleanupsJunio C Hamano2005-09-161-11/+8
| | | | | | Clean-ups suggested by Sergey Vlasov and acked by Daniel Barkalow. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Debian: build-depend on "bc"Matthias Urlichs2005-09-162-2/+2
| | | | | | | | | Build systems should run tests. This patch adds the necessary debian/control and debian/rules bits ("bc" was missing, t/t4002-diff-basic.sh wants it). Signed-off-by: Matthias Urlichs <smurf@smurf.noris.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Make git-checkout failure message more friendly.Junio C Hamano2005-09-161-1/+2
| | | | | | ... or less so, perhaps ;-). Suggested by Jeff Garzik. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Update git-core.spec.inChris Wright2005-09-161-6/+20
| | | | | | | | | | | | | | Update git-core spec file based on feedback from Fedora Extras review. - update BuildRoot to be more specific - eliminate Requires that must be satisfied for base system install - drop Vendor - use dist tag to differentiate between branches - own %{_datadir}/git-core/ - use RPM_OPT_FLAGS in spec file Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] PATCH Documentation/git-rev-list.txt typo fixPeter Hagervall2005-09-161-2/+5
| | | | | | | | | | | | An earlier commit causes a mismatch in <emphasis> and <superscript> tags, one way of fixing it is having no more than one caret symbol per line, which is the only solution I found in the asciidoc documentation. Ugly, but it works. [jc: ugly indeed but that is not Peter's fault.] Signed-off-by: Peter Hagervall <hager@cs.umu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Recommend 'less' for Debian.Junio C Hamano2005-09-151-1/+1
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Require less in RPM specHorst von Brand2005-09-151-1/+4
| | | | | | ... and the next one will be the one to do Debian, naturally. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Revert breakage introduced by c80522e30fdc190f8c8c7fc983bbe040a1b03e93.Junio C Hamano2005-09-151-1/+1
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Documentation/git-rev-list.txt typo fixjdl@freescale.com2005-09-151-2/+2
| | | | | | | Fix the "superscript" problem on the git-rev-list doc page. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Re-organize "git-rev-list --objects" logicLinus Torvalds2005-09-151-25/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic to calculate the full object list used to be very inter-twined with the logic that looked up the commits. For no good reason - it's actually a lot simpler to just do that logic as a separate pass. This improves performance a bit, and uses slightly less memory in my tests, but more importantly it makes the code simpler to work with and follow what it does. The performance win is less than I had hoped for, but I get: Before: [torvalds@g5 linux]$ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 13.64user 0.42system 0:14.13elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+47947minor)pagefaults 0swaps 58945 After: [torvalds@g5 linux]$ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l 11.80user 0.36system 0:12.16elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+42684minor)pagefaults 0swaps 58945 ie it improved by 2 seconds, and took a 5000+ fewer pages (hey, that's 20MB out of 174MB to go). And got the same number of objects (in theory, the more expensive one might find some more shared objects to avoid. In practice it obviously doesn't). I know how to make it use _lots_ less memory, which will probably speed it up. But that's for another time, and I'd prefer to see this go in first. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Plug diff leaks.Junio C Hamano2005-09-153-25/+37
| | | | | | | | | | | | | | | | It is a bit embarrassing that it took this long for a fix since the problem was first reported on Aug 13th. Message-ID: <87y876gl1r.wl@mail2.atmark-techno.com> From: Yasushi SHOJI <yashi@atmark-techno.com> Newsgroups: gmane.comp.version-control.git Subject: [patch] possible memory leak in diff.c::diff_free_filepair() Date: Sat, 13 Aug 2005 19:58:56 +0900 This time I used valgrind to make sure that it does not overeagerly discard memory that is still being used. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Avoid wasting memory while keeping track of what we have during fetch.Junio C Hamano2005-09-151-0/+1
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Avoid wasting memory in git-rev-listLinus Torvalds2005-09-153-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out on the list, git-rev-list can use a lot of memory. One low-hanging fruit is to free the commit buffer for commits that we parse. By default, parse_commit() will save away the buffer, since a lot of cases do want it, and re-reading it continually would be unnecessary. However, in many cases the buffer isn't actually necessary and saving it just wastes memory. We could just free the buffer ourselves, but especially in git-rev-list, we actually end up using the helper functions that automatically add parent commits to the commit lists, so we don't actually control the commit parsing directly. Instead, just make this behaviour of "parse_commit()" a global flag. Maybe this is a bit tasteless, but it's very simple, and it makes a noticable difference in memory usage. Before the change: [torvalds@g5 linux]$ /usr/bin/time git-rev-list v2.6.12..HEAD > /dev/null 0.26user 0.02system 0:00.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+3714minor)pagefaults 0swaps after the change: [torvalds@g5 linux]$ /usr/bin/time git-rev-list v2.6.12..HEAD > /dev/null 0.26user 0.00system 0:00.27elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+2433minor)pagefaults 0swaps note how the minor faults have decreased from 3714 pages to 2433 pages. That's all due to the fewer anonymous pages allocated to hold the comment buffers and their metadata. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Be more backward compatible with git-ssh-{push,pull}.Junio C Hamano2005-09-157-6/+46
| | | | | | | | HPA reminded me that these programs knows about the name of the counterpart on the other end and simply symlinking the old name to new name locally would not be enough. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] rsh.c env and quoting cleanup, take 2H. Peter Anvin2005-09-151-16/+89
| | | | | | | | | | | | | | | | | | | This patch does proper quoting, and uses "env" to be compatible with tcsh. As a side benefit, I believe the code is a lot cleaner to read. [jc: I am accepting this not because I necessarily agree with the quoting approach taken by it, but because (1) the code is only used by ssh-fetch/ssh-upload pair which I do not care much about (if you have ssh account on the remote end you should be using git-send-pack git-fetch-pack pair over ssh anyway), and (2) HPA is one of the more important customers belonging to the Linux kernel community and I want to help his workflow -- which includes not wasting his time by asking him to switch to git-send-pack/git-fetch-pack pair, nor to use a better shell ;-). I might not have taken this patch if it mucked with git_connect in connect.c in its current form.] Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Fix fetch completeness assumptionsDaniel Barkalow2005-09-151-2/+26
| | | | | | | | Don't assume that any commit we have is complete; assume that any ref we have is complete. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Document git-fetch optionsSergey Vlasov2005-09-152-0/+17
| | | | | | Add documentation for git-fetch options Signed-off-by: Junio C Hamano <junkio@cox.net>
* Unoptimize info/refs creation.Junio C Hamano2005-09-151-26/+0
| | | | | | | | The code did not catch the case where you removed an existing ref without changing anything else. We are not talking about hundreds of refs anyway, so remove that optimization. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Retire info/rev-cacheJunio C Hamano2005-09-1512-558/+4
| | | | | | | It was one of those things that were well intentioned but did not turn out to be useful in practice. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Use '-d' as the first flag to 'install'Peter Eriksen2005-09-152-3/+3
| | | | | | | | | ... in order to please Solaris 'install'. GNU install is not harmed with this. [jc: Documentation/Makefile also fixed.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] git-http-fetch: Allow caching of retrieved objects by proxy serversSergey Vlasov2005-09-151-0/+8
| | | | | | | | | | | | | | | By default the curl library adds "Pragma: no-cache" header to all requests, which disables caching by proxy servers. However, most files in a GIT repository are immutable, and caching them is safe and could be useful. This patch removes the "Pragma: no-cache" header from requests for all files except the pack list (objects/info/packs) and references (refs/*), which are really mutable and should not be cached. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 3b2a4c46fd5093ec79fb60e1b14b8d4a58c74612 commit)
* git-branch -d <branch>: delete unused branch.Junio C Hamano2005-09-151-6/+54
| | | | | | | | | | The new flag '-d' lets you delete a branch. For safety, it does not lets you delete the branch you are currently on, nor a branch that has been fully merged into your current branch. The credit for the safety check idea goes to Daniel Barkalow. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Revert "[PATCH] plug memory leak in diff.c::diff_free_filepair()"Junio C Hamano2005-09-143-7/+8
| | | | This reverts 068eac91ce04b9aca163acb1927c3878c45d1a07 commit.
* [PATCH] Fix alloc_filespec() initializationLinus Torvalds2005-09-141-7/+3
| | | | | | | | | | This simplifies and fixes the initialization of a "diff_filespec" when allocated. The old code would not initialize "sha1_valid". Noticed by valgrind. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make merge comment git-pull makes for an octopus a bit prettier.Junio C Hamano2005-09-131-3/+5
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* read-tree: fix bogus debugging statement.Junio C Hamano2005-09-131-6/+9
| | | | | | | We wanted to detect case #16 which should be rare, but botched the case when some paths are missing, causing a segfault. My fault. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-merge-recursive: Trivial RE fixes.Junio C Hamano2005-09-131-2/+2
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Use the 'die' function where it is appropriate.Fredrik Kuivinen2005-09-131-14/+13
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Use a temporary index file when we merge the common ancestors.Fredrik Kuivinen2005-09-131-5/+18
| | | | | | | | With this change we can get rid of a call to 'git-update-index --refresh'. Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Adjust git-merge-recursive.py for the new tool names.Fredrik Kuivinen2005-09-131-4/+4
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Don't output 'Automatic merge failed, ...'Fredrik Kuivinen2005-09-131-1/+0
| | | | | | | git-merge.sh does this for us. Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Be more like the 'resolve' strategy.Fredrik Kuivinen2005-09-131-35/+33
| | | | | | | | | | | If there are non-mergeable changes leave the head contents in the cache and update the working directory with the output from merge(1). In the add/add and delete/modify conflict cases leave unmerged cache entries in the index. Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Define relative .git/objects/info/alternates semantics.Junio C Hamano2005-09-131-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | An entry in the alternates file can name a directory relative to the object store it describes. A typical linux-2.6 maintainer repository would have "../../../torvalds/linux-2.6.git/objects" there, because the subsystem maintainer object store would live in /pub/scm/linux/kernel/git/$u/$system.git/objects/ and the object store of Linus tree is in /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/ This unfortunately is different from GIT_ALTERNATE_OBJECT_DIRECTORIES which is relative to the cwd of the running process, but there is no way to make it consistent with the behaviour of the environment variable. The process typically is run in $system.git/ directory for a naked repository, or one level up for a repository with a working tree, so we just define it to be relative to the objects/ directory to be different from either ;-). Later, the dumb transport could be updated to read from info/alternates and make requests for the repository the repository borrows from. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Detect ls-remote failure properly.Junio C Hamano2005-09-131-3/+12
| | | | | | | The part that can fail is before the pipe, so we need to propagate the error properly to the main process. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Rename the 'fredrik' merge strategy to 'recursive'.Fredrik Kuivinen2005-09-134-4/+4
| | | | | | | | Otherwise we would regret when Fredrik comes up with another merge algorithm with different pros-and-cons with the current one. Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix off-by-one error in git-mergeJunio C Hamano2005-09-121-1/+1
| | | | | | | 'git-merge -s' without a strategy name does not fail and does not give usage as it should. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Propagate errors from fetch-pack correctly to git-fetch.Junio C Hamano2005-09-121-2/+9
| | | | | | | When git-fetch-pack fails, the command does not notice the failure and instead pretended nothing was fetched and there was nothing wrong. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix CDPATH problem.Junio C Hamano2005-09-122-0/+9
| | | | | | | | | | | | | | | | | | | CDPATH has two problems: * It takes scripts to unexpected places (somebody had CDPATH=..:../..:$HOME and the "cd" in git-clone.sh:get_repo_base took him to $HOME/.git when he said "clone foo bar" to clone a repository in "foo" which had "foo/.git"). CDPATH mechanism does not implicitly give "." at the beginning of CDPATH, which is the most irritating part. * The extra echo when it does its thing confuses scripts further. Most of our scripts that use "cd" includes git-sh-setup so the problem is primarily fixed there. git-clone starts without a repository, and it needs its own fix. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document git-grep and link it from the main git(7) page.Junio C Hamano2005-09-123-3/+54
| | | | | | Also adjust missing description in the git.txt page while we are at it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Make 'git checkout' a bit more forgiving when switching branches.Junio C Hamano2005-09-121-0/+1
| | | | | | | | | | | | | | | | | | If you make a commit on a path, and then make the path cache-dirty afterwards without changing its contents, 'git checkout' to switch to another branch is prevented because switching the branches done with 'read-tree -m -u $current $next' detects that the path is cache-dirty, but it does not bother noticing that the contents of the path has not been actualy changed. Since switching branches would involve checking out paths different in the two branches, hence it is reasonably expensive operation, we can afford to run update-index before running read-tree to reduce this kind of false change from triggering the check needlessly. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Omit patches that have already been merged from format-patch output.Junio C Hamano2005-09-121-11/+27
| | | | | | | | This switches the logic to pick which commits to include in the output from git-rev-list to git-cherry; as a side effect, 'format-patch ^up mine' would stop working although up..mine would continue to work. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] There are several undocumented dependenciesHorst von Brand2005-09-122-3/+12
| | | | | | | | | | | | | | | | | | | | There are several undocumented dependencies in the .spec and in the INSTALL files. The following is from Fedora, perhaps other RPM distributions call the packages differently. Also, the manpages aren't always installed gzipped. Updates to git-core.spec.in file: - Some git scripts use Perl - gitk needs wish, which is part of TCL/Tk. - curl is used all over - Need the ssh program from openssh-clients Updates to INSTALL: - Mention wish - Mention ssh Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>