summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-12-13pack-objects: don't use too many threads with few objectsLibravatar Nicolas Pitre1-0/+4
If there are few objects to deltify, they might be split amongst threads so that there is simply no other objects left to delta against within the same thread. Let's use the same 2*window treshold as used for the final load balancing to allow extra threads to be created. This fixes the benign t5300 test failure. Signed-off-by: Nicolas Pitre <nico@cam.org> Tested-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-12autodetect number of CPUs by default when using threadsLibravatar Nicolas Pitre1-1/+4
... and display the actual number of threads used when locally repacking. A remote server still won't tell you how many threads it uses during a fetch though. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-11Merge branch 'maint'Libravatar Junio C Hamano4-7/+64
* maint: fsck: reduce stack footprint make sure packs to be replaced are closed beforehand
2008-12-11fsck: reduce stack footprintLibravatar Linus Torvalds1-7/+31
The logic to mark all objects that are reachable from tips of refs were implemented as a set of recursive functions. In a repository with a deep enough history, this can easily eat up all the available stack space. Restructure the code to require less stackspace by using an object array to keep track of the objects that still need to be processed. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-10rebase: improve error messages about dirty stateLibravatar Jeff King1-3/+6
If you have unstaged changes in your working tree and try to rebase, you will get the cryptic "foo: needs update" message, but nothing else. If you have staged changes, you get "your index is not up-to-date". Let's improve this situation in two ways: - for unstaged changes, let's also tell them we are canceling the rebase, and why (in addition to the "needs update" lines) - for the staged changes case, let's use language that is a little more clear to the user: their index contains uncommitted changes Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-10make sure packs to be replaced are closed beforehandLibravatar Nicolas Pitre3-0/+33
Especially on Windows where an opened file cannot be replaced, make sure pack-objects always close packs it is about to replace. Even on non Windows systems, this could save potential bad results if ever objects were to be read from the new pack file using offset from the old index. This should fix t5303 on Windows. Signed-off-by: Nicolas Pitre <nico@cam.org> Tested-by: Johannes Sixt <j6t@kdbg.org> (MinGW) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-10Fix typo in comment in builtin-add.cLibravatar Alexander Potashev1-1/+1
Reported-by: Tim Daly <daly@axiom-developer.org> Signed-off-by: Alexander Potashev <aspotashev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-10Fix t4031Libravatar Junio C Hamano1-1/+1
When I tweaked the patch to use $SHELL_PATH instead of a hard-coded "#!/bin/sh" to produce 3aa1f7c (diff: respect textconv in rewrite diffs, 2008-12-09), I screwed up. This should fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-09Merge branch 'maint'Libravatar Junio C Hamano3-13/+63
* maint: work around Python warnings from AsciiDoc git-svn: Make following parents atomic
2008-12-09diff: respect textconv in rewrite diffsLibravatar Jeff King2-13/+59
Currently we just skip rewrite diffs for binary files; this patch makes an exception for files which will be textconv'd, and actually performs the textconv before generating the diff. Conceptually, rewrite diffs should be in the exact same format as the a non-rewrite diff, except that we refuse to share any context. Thus it makes very little sense for "git diff" to show a textconv'd diff, but for "git diff -B" to show "Binary files differ". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-09diff: fix handling of binary rewrite diffsLibravatar Jeff King2-1/+48
The current emit_rewrite_diff code always writes a text patch without checking whether the content is binary. This means that if you end up with a rewrite diff for a binary file, you get lots of raw binary goo in your patch. Instead, if we have binary files, then let's just skip emit_rewrite_diff altogether. We will already have shown the "dissimilarity index" line, so it is really about the diff contents. If binary diffs are turned off, the "Binary files a/file and b/file differ" message should be the same in either case. If we do have binary patches turned on, there isn't much point in making a less-efficient binary patch that does a total rewrite; no human is going to read it, and since binary patches don't apply with any fuzz anyway, the result of application should be the same. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-09Fix typos in documentationLibravatar Alexander Potashev2-2/+2
Signed-off-by: Alexander Potashev <aspotashev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-09git-p4: Fix regression in p4Where method.Libravatar Tor Arvid Lund1-3/+10
Unfortunately, I introduced a bug in commit 7f705dc36 (git-p4: Fix bug in p4Where method). This happens because sometimes the result from "p4 where <somepath>" doesn't contain a "depotFile" key, but instead a "data" key that needs further parsing. This commit should ensure that both of these cases are checked. Signed-off-by: Tor Arvid Lund <torarvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-09Improve language in git-merge.txt and related docsLibravatar Ralf Wildenhues9-49/+48
Improve some minor language and format issues like hyphenation, phrases, spacing, word order, comma, attributes. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-09work around Python warnings from AsciiDocLibravatar Junio C Hamano1-9/+9
It appears that a reference to an anchor defined as [[anchor-name]] from another place using <<anchor-name>> syntax, when the anchor name contains a string "-with-" in its name, triggers these warnings from Python interpreter. asciidoc -b docbook -d book user-manual.txt <string>:1: Warning: 'with' will become a reserved keyword in Python 2.6 <string>:1: Warning: 'with' will become a reserved keyword in Python 2.6 <string>:1: Warning: 'with' will become a reserved keyword in Python 2.6 <string>:1: Warning: 'with' will become a reserved keyword in Python 2.6 There currently is no reference to "Finding comments with given content", but for consistency and for futureproofing, the anchor is also updated as the other ones that are actually used and trigger these warnings. Signed-off-by: Junio C Hamano <junio@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-08Define linkgit macro in [macros] sectionLibravatar Alexey Borzenkov1-0/+3
Starting with asciidoc 8.3.0 linkgit macro is no longer recognized by asciidoc and user guide suggests (http://www.methods.co.nz/asciidoc/userguide.html#_macro_definitions) that macros are supposed to be defined in [macros] section. I'm not sure whether undefined linkgit macro was working by pure chance or it is a regression in asciidoc 8.3.0, but this patch adds proper definition for the linkgit macro, allowing it to work on 8.3.0. Signed-off-by: Alexey Borzenkov <snaury@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-08git-svn: Make following parents atomicLibravatar Deskin Miller2-4/+54
find_parent_branch generates branch@rev type branches when one has to look back through SVN history to properly get the history for a branch copied from somewhere not already being tracked by git-svn. If in the process of fetching this history, git-svn is interrupted, then when one fetches again, it will use whatever was last fetched as the parent commit and fail to fetch any more history which it didn't get to before being terminated. This is especially troubling in that different git-svn copies of the same SVN repository can end up with different commit sha1s, incorrectly showing the history as divergent and precluding easy collaboration using git push and fetch. To fix this, when we initialise the Git::SVN object $gs to search for and perhaps fetch history, we check if there are any commits in SVN in the range between the current revision $gs is at, and the top revision for which we were asked to fill history. If there are commits we're missing in that range, we continue the fetch from the current revision to the top, properly getting all history before using it as the parent for the branch we're trying to create. Signed-off-by: Deskin Miller <deskinm@umich.edu> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-08gitweb: Fix bug in insert_file() subroutineLibravatar Jakub Narebski2-1/+11
In insert_file() subroutine (which is used to insert HTML fragments as custom header, footer, hometext (for projects list view), and per project README.html (for summary view)) we used: map(to_utf8, <$fd>); This doesn't work, and other form has to be used: map { to_utf8($_) } <$fd>; Now with test for t9600 added, for $GIT_DIR/README.html. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07diff: allow turning on textconv explicitly for plumbingLibravatar Jeff King1-0/+4
Some history viewers use the diff plumbing to generate diffs rather than going through the "git diff" porcelain. Currently, there is no way for them to specify that they would like to see the text-converted version of the diff. This patch adds a "--textconv" option to allow such a plumbing user to allow text conversion. The user can then tell the viewer whether or not they would like text conversion enabled. While it may be tempting add a configuration option rather than requiring each plumbing user to be configured to pass --textconv, that is somewhat dangerous. Text-converted diffs generally cannot be applied directly, so each plumbing user should "opt in" to generating such a diff, either by explicit request of the user or by confirming that their output will not be fed to patch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07reorder ALLOW_TEXTCONV option settingLibravatar Jeff King3-4/+4
Right now for the diff porcelain and the log family, we call: init_revisions(); setup_revisions(); DIFF_OPT_SET(ALLOW_TEXTCONV); However, that means textconv will _always_ be on, instead of being a default that can be manipulated with setup_revisions. Instead, we want: init_revisions(); DIFF_OPT_SET(ALLOW_TEXTCONV); setup_revisions(); which is what this patch does. We'll go ahead and move the callsite in wt-status, also; even though the user can't pass any options here, it is a cleanup that will help avoid any surprise later if the setup_revisions line is changed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07read-cache.c: typofix in commentLibravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07builtin-checkout.c: check error return from read_cache()Libravatar Junio C Hamano1-2/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07Point "stale" 1.6.0.5 documentation from the main git documentation pageLibravatar Junio C Hamano1-1/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07Revert "git-stash: use git rev-parse -q"Libravatar Junio C Hamano1-6/+6
This reverts commit 757c7f60a78004fc3d0ea62f44320d54ef430c10 as an unnecessary error message to pop up when the last stash entry is dropped. It simply is not worth the aggravation.
2008-12-07Update draft release notes for 1.6.1Libravatar Junio C Hamano1-22/+1
A handful of fixes have been backmerged to 'maint' and are now contained in 1.6.0.X series as the result, so drop them from this document. Also contains typofix and duplicate removal pointed out by Bjørn Lindeijer and Jakub Narebski. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07Merge branch 'maint'Libravatar Junio C Hamano5-31/+55
* maint: GIT 1.6.0.5 "git diff <tree>{3,}": do not reverse order of arguments tag: delete TAG_EDITMSG only on successful tag gitweb: Make project specific override for 'grep' feature work http.c: use 'git_config_string' to get 'curl_http_proxy' fetch-pack: Avoid memcpy() with src==dst
2008-12-07GIT 1.6.0.5Libravatar Junio C Hamano1-15/+28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07"git diff <tree>{3,}": do not reverse order of argumentsLibravatar Matt McCutchen3-3/+31
According to the message of commit 0fe7c1de16f71312e6adac4b85bddf0d62a47168, "git diff" with three or more trees expects the merged tree first followed by the parents, in order. However, this command reversed the order of its arguments, resulting in confusing diffs. A comment /* Again, the revs are all reverse */ suggested there was a reason for this, but I can't figure out the reason, so I removed the reversal of the arguments. Test case included. Signed-off-by: Matt McCutchen <matt@mattmccutchen.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-07tag: delete TAG_EDITMSG only on successful tagLibravatar Jeff King1-8/+20
The user may put some effort into writing an annotated tag message. When the tagging process later fails (which can happen fairly easily, since it may be dependent on gpg being correctly configured and used), there is no record left on disk of the tag message. Instead, let's keep the TAG_EDITMSG file around until we are sure the tag has been created successfully. If we die because of an error, the user can recover their text from that file. Leaving the file in place causes no conflicts; it will be silently overwritten by the next annotated tag creation. This matches the behavior of COMMIT_EDITMSG, which stays around in case of error. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07gitweb: Make project specific override for 'grep' feature workLibravatar Jakub Narebski1-0/+1
The 'grep' feature was marked in the comments as having project specific config, but it lacked 'sub' key required for it to work. Kind-of-Noticed-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07http.c: use 'git_config_string' to get 'curl_http_proxy'Libravatar Miklos Vajna1-7/+4
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-07fetch-pack: Avoid memcpy() with src==dstLibravatar Thomas Rast1-1/+2
memcpy() may only be used for disjoint memory areas, but when invoked from cmd_fetch_pack(), we have my_args == &args. (The argument cannot be removed entirely because transport.c invokes with its own variable.) Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-05Update draft release notes to 1.6.1Libravatar Junio C Hamano1-1/+17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-05Merge branch 'jc/am-options'Libravatar Junio C Hamano12-5/+238
* jc/am-options: git-am: rename apply_opt_extra file to apply-opt Test that git-am does not lose -C/-p/--whitespace options git-am: propagate --3way options as well git-am: propagate -C<n>, -p<n> options as well git-am --whitespace: do not lose the command line option
2008-12-05git-am: rename apply_opt_extra file to apply-optLibravatar Junio C Hamano2-3/+2
All other state files use dash in their names, not underscores. Also, there is no reason to call this "extra". Drop it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-04Test that git-am does not lose -C/-p/--whitespace optionsLibravatar Junio C Hamano11-0/+229
These tests make sure that "git am" does not lose command line options specified when it was started, after it is interrupted by a patch that does not apply earlier in the series. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-04git-am: propagate --3way options as wellLibravatar Junio C Hamano1-2/+7
The reasoning is the same as the previous patch, where we made -C<n> and -p<n> propagate across a failure. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-04git-am: propagate -C<n>, -p<n> options as wellLibravatar Junio C Hamano1-7/+7
These options are meant to deal with patches that do not apply cleanly due to the differences between the version the patch was based on and the version "git am" is working on. Because a series of patches applied in the same "git am" run tends to come from the same source, it is more useful to propagate these options after the application stops. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-04git-am --whitespace: do not lose the command line optionLibravatar Junio C Hamano1-4/+4
When you start "git am --whitespace=fix" and the patch application process is interrupted by an unapplicable patch early in the series, after fixing the offending patch, the remainder of the patch should be processed still with --whitespace=fix when restarted with "git am --resolved" (or dropping the offending patch with "git am --skip"). The breakage was introduced by the commit 67dad68 (add -C[NUM] to git-am, 2007-02-08); this should fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-04git-p4: Fix bug in p4Where method.Libravatar Tor Arvid Lund1-1/+9
When running: p4 where //depot/SomePath/... The result can in some situations look like: //depot/SomePath/... //client/SomePath/... /home/user/p4root/SomePath/... -//depot/SomePath/UndesiredSubdir/... //client/SomePath/UndesiredSubdir/... /home/user/p4root/SomePath/UndesiredSubdir/... This depends on the users Client view. The current p4Where method will now return /home/user/p4root/SomePath/UndesiredSubdir/... which is not what we want. This patch loops through the results from "p4 where", and picks the one where the depotFile exactly matches the given depotPath (//depot/SomePath/... in this example). Signed-off-by: Tor Arvid Lund <torarvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-04Report symlink failures in merge-recursiveLibravatar Alex Riesen1-1/+2
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-04Make chdir failures visibleLibravatar Alex Riesen2-3/+4
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-04Make some of fwrite/fclose/write/close failures visibleLibravatar Alex Riesen3-15/+45
So that full filesystem conditions or permissions problems won't go unnoticed. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-03Merge branch 'dm/svn-remote'Libravatar Junio C Hamano2-1/+20
* dm/svn-remote: git-svn: Make branch use correct svn-remote
2008-12-03Merge branch 'jn/gitweb-utf8'Libravatar Junio C Hamano1-16/+16
* jn/gitweb-utf8: gitweb: Fix handling of non-ASCII characters in inserted HTML files
2008-12-03add stage to gitignoreLibravatar Jeff King1-0/+1
This is a generated builtin since 24b1f65f (Install git-stage in exec-path). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-03submodule: use git rev-parse -qLibravatar Miklos Vajna1-3/+3
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-03rebase: use git rev-parse -qLibravatar Miklos Vajna1-2/+2
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-03pull: use git rev-parse -qLibravatar Miklos Vajna1-4/+4
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-03lost-found: use git rev-parse -qLibravatar Miklos Vajna1-1/+1
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>