4f22b10 | Jeff King | 24 February 2012, 22:10:17 UTC | do not stream large files to pack when filters are in use Because git's object format requires us to specify the number of bytes in the object in its header, we must know the size before streaming a blob into the object database. This is not a problem when adding a regular file, as we can get the size from stat(). However, when filters are in use (such as autocrlf, or the ident, filter, or eol gitattributes), we have no idea what the ultimate size will be. The current code just punts on the whole issue and ignores filter configuration entirely for files larger than core.bigfilethreshold. This can generate confusing results if you use filters for large binary files, as the filter will suddenly stop working as the file goes over a certain size. Rather than try to handle unknown input sizes with streaming, this patch just turns off the streaming optimization when filters are in use. This has a slight performance regression in a very specific case: if you have autocrlf on, but no gitattributes, a large binary file will avoid the streaming code path because we don't know beforehand whether it will need conversion or not. But if you are handling large binary files, you should be marking them as such via attributes (or at least not using autocrlf, and instead marking your text files as such). And the flip side is that if you have a large _non_-binary file, there is a correctness improvement; before we did not apply the conversion at all. The first half of the new t1051 script covers these failures on input. The second half tests the matching output code paths. These already work correctly, and do not need any adjustment. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 24 February 2012, 22:18:20 UTC |
4c3b57b | Jeff King | 24 February 2012, 22:05:03 UTC | teach dry-run convert_to_git not to require a src buffer When we call convert_to_git in dry-run mode, it may still want to look at the source buffer, because some CRLF conversion modes depend on analyzing the source to determine whether it is in fact convertible CRLF text. However, the main motivation for convert_to_git's dry-run mode is that we would decide which method to use to acquire the blob's data (streaming versus in-core). Requiring this source analysis creates a chicken-and-egg problem. We are better off simply guessing that anything we can't analyze will end up needing conversion. This patch lets a caller specify a NULL src buffer when using dry-run mode (and only dry-run mode). A non-zero return value goes from "we would convert" to "we might convert"; a zero return value remains "we would definitely not convert". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 24 February 2012, 22:12:19 UTC |
92ac319 | Jeff King | 24 February 2012, 22:02:37 UTC | teach convert_to_git a "dry run" mode Some callers may want to know whether convert_to_git will actually do anything before performing the conversion itself (e.g., to decide whether to stream or handle blobs in-core). This patch lets callers specify the dry run mode by passing a NULL destination buffer. The return value, instead of indicating whether conversion happened, will indicate whether conversion would occur. For readability, we also include a wrapper function which makes it more obvious we are not actually performing the conversion. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 24 February 2012, 22:11:27 UTC |
d0482e8 | Junio C Hamano | 06 February 2012, 07:52:53 UTC | Sync with 1.7.6.6 * maint-1.7.7: Git 1.7.6.6 imap-send: remove dead code | 06 February 2012, 07:52:53 UTC |
110c511 | Junio C Hamano | 06 February 2012, 07:52:25 UTC | Sync with 1.7.6.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 06 February 2012, 07:52:25 UTC |
f174a25 | Junio C Hamano | 06 February 2012, 07:46:44 UTC | Git 1.7.6.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 06 February 2012, 07:50:52 UTC |
28b22f8 | Jeff King | 06 February 2012, 06:29:37 UTC | imap-send: remove dead code The imap-send code was adapted from another project, and still contains many unused bits of code. One of these bits contains a type "struct string_list" which bears no resemblence to the "struct string_list" we use elsewhere in git. This causes the compiler to complain if git's string_list ever becomes part of cache.h. Let's just drop the dead code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 06 February 2012, 07:44:56 UTC |
c572f49 | Junio C Hamano | 18 January 2012, 23:51:00 UTC | Git 1.7.8.4 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 18 January 2012, 23:51:00 UTC |
d899cf5 | Junio C Hamano | 18 January 2012, 23:48:46 UTC | Merge branch 'maint-1.7.7' into maint * maint-1.7.7: Git 1.7.7.6 diff-index: enable recursive pathspec matching in unpack_trees Conflicts: GIT-VERSION-GEN | 18 January 2012, 23:48:46 UTC |
0065343 | Junio C Hamano | 18 January 2012, 23:46:31 UTC | Git 1.7.7.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 18 January 2012, 23:46:31 UTC |
5c8eeb8 | Nguyen Thai Ngoc Duy | 15 January 2012, 10:03:27 UTC | diff-index: enable recursive pathspec matching in unpack_trees The pathspec structure has a few bits of data to drive various operation modes after we unified the pathspec matching logic in various codepaths. For example, max_depth field is there so that "git grep" can limit the output for files found in limited depth of tree traversal. Also in order to show just the surface level differences in "git diff-tree", recursive field stops us from descending into deeper level of the tree structure when it is set to false, and this also affects pathspec matching when we have wildcards in the pathspec. The diff-index has always wanted the recursive behaviour, and wanted to match pathspecs without any depth limit. But we forgot to do so when we updated tree_entry_interesting() logic to unify the pathspec matching logic. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 18 January 2012, 23:44:02 UTC |
ab8a780 | Junio C Hamano | 13 January 2012, 07:33:29 UTC | Update draft release notes to 1.7.8.4 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 13 January 2012, 07:33:29 UTC |
5a6a939 | Junio C Hamano | 13 January 2012, 07:31:46 UTC | Merge branch 'maint-1.7.7' into maint * maint-1.7.7: Update draft release notes to 1.7.7.6 Update draft release notes to 1.7.6.6 thin-pack: try harder to use preferred base objects as base | 13 January 2012, 07:31:46 UTC |
8f83acf | Junio C Hamano | 13 January 2012, 07:31:41 UTC | Update draft release notes to 1.7.7.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 13 January 2012, 07:31:41 UTC |
901c907 | Junio C Hamano | 13 January 2012, 07:31:05 UTC | Merge branch 'maint-1.7.6' into maint-1.7.7 * maint-1.7.6: Update draft release notes to 1.7.6.6 thin-pack: try harder to use preferred base objects as base | 13 January 2012, 07:31:05 UTC |
04f6785 | Junio C Hamano | 13 January 2012, 07:30:53 UTC | Update draft release notes to 1.7.6.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 13 January 2012, 07:30:53 UTC |
15f07e0 | Jeff King | 12 January 2012, 22:32:34 UTC | thin-pack: try harder to use preferred base objects as base When creating a pack using objects that reside in existing packs, we try to avoid recomputing futile delta between an object (trg) and a candidate for its base object (src) if they are stored in the same packfile, and trg is not recorded as a delta already. This heuristics makes sense because it is likely that we tried to express trg as a delta based on src but it did not produce a good delta when we created the existing pack. As the pack heuristics prefer producing delta to remove data, and Linus's law dictates that the size of a file grows over time, we tend to record the newest version of the file as inflated, and older ones as delta against it. When creating a thin-pack to transfer recent history, it is likely that we will try to send an object that is recorded in full, as it is newer. But the heuristics to avoid recomputing futile delta effectively forbids us from attempting to express such an object as a delta based on another object. Sending an object in full is often more expensive than sending a suboptimal delta based on other objects, and it is even more so if we could use an object we know the receiving end already has (i.e. preferred base object) as the delta base. Tweak the recomputation avoidance logic, so that we do not punt on computing delta against a preferred base object. The effect of this change can be seen on two simulated upload-pack workloads. The first is based on 44 reflog entries from my git.git origin/master reflog, and represents the packs that kernel.org sent me git updates for the past month or two. The second workload represents much larger fetches, going from git's v1.0.0 tag to v1.1.0, then v1.1.0 to v1.2.0, and so on. The table below shows the average generated pack size and the average CPU time consumed for each dataset, both before and after the patch: dataset | reflog | tags --------------------------------- before | 53358 | 2750977 size after | 32398 | 2668479 change | -39% | -3% --------------------------------- before | 0.18 | 1.12 CPU after | 0.18 | 1.15 change | +0% | +3% This patch makes a much bigger difference for packs with a shorter slice of history (since its effect is seen at the boundaries of the pack) though it has some benefit even for larger packs. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 13 January 2012, 07:06:20 UTC |
113e828 | Junio C Hamano | 12 January 2012, 03:11:13 UTC | Merge branch 'maint-1.7.7' into maint * maint-1.7.7: attr: fix leak in free_attr_elem t2203: fix wrong commit command | 12 January 2012, 03:11:13 UTC |
afb6b56 | Junio C Hamano | 12 January 2012, 03:11:00 UTC | Merge branch 'maint-1.7.6' into maint-1.7.7 * maint-1.7.6: attr: fix leak in free_attr_elem t2203: fix wrong commit command | 12 January 2012, 03:11:00 UTC |
37475f9 | Jeff King | 12 January 2012, 03:05:03 UTC | attr: fix leak in free_attr_elem This function frees the individual "struct match_attr"s we have allocated, but forgot to free the array holding their pointers, leading to a minor memory leak (but it can add up after checking attributes for paths in many directories). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 12 January 2012, 03:07:23 UTC |
592ed56 | Nguyễn Thái Ngọc Duy | 11 January 2012, 03:21:38 UTC | t2203: fix wrong commit command Add commit message to avoid commit's aborting due to the lack of commit message, not because there are INTENT_TO_ADD entries in index. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 11 January 2012, 08:09:36 UTC |
be4d292 | Junio C Hamano | 10 January 2012, 22:27:14 UTC | Prepare for 1.7.8.4 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 22:27:14 UTC |
55dcc2e | Junio C Hamano | 10 January 2012, 22:24:01 UTC | Merge the attributes fix in from maint-1.6.7 branch Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 22:24:01 UTC |
804e97f | Junio C Hamano | 10 January 2012, 22:16:49 UTC | Prepare for 1.7.7.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 22:16:49 UTC |
6c65b5e | Junio C Hamano | 10 January 2012, 22:14:26 UTC | Merge the attributes fix in from maint-1.6.6 branch Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 22:14:26 UTC |
f14f980 | Junio C Hamano | 10 January 2012, 21:11:03 UTC | Prepare for 1.7.6.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 21:11:03 UTC |
b6fb7fe | Junio C Hamano | 10 January 2012, 14:57:27 UTC | Documentation: rerere's rr-cache auto-creation and rerere.enabled The description of rerere.enabled left the user in the dark as to who might create an rr-cache directory. Add a note that simply invoking rerere does this. Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 20:59:31 UTC |
c432ef9 | Junio C Hamano | 10 January 2012, 20:28:38 UTC | attr.c: clarify the logic to pop attr_stack Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 20:28:38 UTC |
909ca7b | Junio C Hamano | 10 January 2012, 20:27:37 UTC | attr.c: make bootstrap_attr_stack() leave early Thas would de-dent the body of a function that has grown rather large over time, making it a bit easier to read. Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 20:27:37 UTC |
77f7f82 | Jeff King | 10 January 2012, 19:32:06 UTC | attr: drop misguided defensive coding In prepare_attr_stack, we pop the old elements of the stack (which were left from a previous lookup and may or may not be useful to us). Our loop to do so checks that we never reach the top of the stack. However, the code immediately afterwards will segfault if we did actually reach the top of the stack. Fortunately, this is not an actual bug, since we will never pop all of the stack elements (we will always keep the root gitattributes, as well as the builtin ones). So the extra check in the loop condition simply clutters the code and makes the intent less clear. Let's get rid of it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 19:55:27 UTC |
1afca44 | Jeff King | 10 January 2012, 18:08:21 UTC | attr: don't confuse prefixes with leading directories When we prepare the attribute stack for a lookup on a path, we start with the cached stack from the previous lookup (because it is common to do several lookups in the same directory hierarchy). So the first thing we must do in preparing the stack is to pop any entries that point to directories we are no longer interested in. For example, if our stack contains gitattributes for: foo/bar/baz foo/bar foo but we want to do a lookup in "foo/bar/bleep", then we want to pop the top element, but retain the others. To do this we walk down the stack from the top, popping elements that do not match our lookup directory. However, the test do this simply checked strncmp, meaning we would mistake "foo/bar/baz" as a leading directory of "foo/bar/baz_plus". We must also check that the character after our match is '/', meaning we matched the whole path component. There are two special cases to consider: 1. The top of our attr stack has the empty path. So we must not check for '/', but rather special-case the empty path, which always matches. 2. Typically when matching paths in this way, you would also need to check for a full string match (i.e., the character after is '\0'). We don't need to do so in this case, though, because our path string is actually just the directory component of the path to a file (i.e., we know that it terminates with "/", because the filename comes after that). Helped-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 10 January 2012, 19:25:40 UTC |
829a1c6 | Jeff King | 09 January 2012, 22:55:42 UTC | send-email: multiedit is a boolean config option The sendemail.multiedit variable is meant to be a boolean. However, it is not marked as such in the code, which means we store its value literally. Thus in the do_edit function, perl ends up coercing it to a boolean value according to perl rules, not git rules. This works for "0", but "false", "no", or "off" will erroneously be interpreted as true. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 09 January 2012, 23:15:28 UTC |
5f4d133 | Junio C Hamano | 06 January 2012, 20:41:39 UTC | Git 1.7.8.3 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 06 January 2012, 20:41:39 UTC |
b15840e | Junio C Hamano | 06 January 2012, 20:36:43 UTC | Merge branch 'jn/maint-gitweb-utf8-fix' into maint * jn/maint-gitweb-utf8-fix: gitweb: Fix fallback mode of to_utf8 subroutine gitweb: Output valid utf8 in git_blame_common('data') gitweb: esc_html() site name for title in OPML gitweb: Call to_utf8() on input string in chop_and_escape_str() | 06 January 2012, 20:36:43 UTC |
cfdfc5a | Junio C Hamano | 06 January 2012, 20:35:12 UTC | Merge branch 'maint-1.7.7' into maint * maint-1.7.7: Documentation: rerere.enabled is the primary way to configure rerere | 06 January 2012, 20:35:12 UTC |
8769e93 | Junio C Hamano | 06 January 2012, 20:35:05 UTC | Merge branch 'maint-1.7.6' into maint-1.7.7 * maint-1.7.6: Documentation: rerere.enabled is the primary way to configure rerere | 06 January 2012, 20:35:05 UTC |
07b88a0 | Thomas Rast | 06 January 2012, 13:08:02 UTC | Documentation: rerere.enabled is the primary way to configure rerere The wording seems to suggest that creating the directory is needed and the setting of rerere.enabled is only for disabling the feature by setting it to 'false'. But the configuration is meant to be the primary control and setting it to 'true' will enable it; the rr-cache directory will be created as necessary and the user does not have to create it. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 06 January 2012, 20:27:59 UTC |
1327d83 | Clemens Buchacher | 04 January 2012, 15:55:34 UTC | t5550: repack everything into one file Subsequently we assume that there is only one pack. Currently this is true only by accident. Pass '-a -d' to repack in order to guarantee that assumption to hold true. The prune-packed command is now redundant since repack -d already calls it. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 04 January 2012, 18:04:59 UTC |
6ea9385 | Junio C Hamano | 04 January 2012, 17:43:26 UTC | Merge branch 'nd/maint-parse-depth' into maint * nd/maint-parse-depth: Catch invalid --depth option passed to clone or fetch | 04 January 2012, 17:43:26 UTC |
e7622ce | Nguyễn Thái Ngọc Duy | 04 January 2012, 10:01:55 UTC | Catch invalid --depth option passed to clone or fetch Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 04 January 2012, 17:39:36 UTC |
bc0fe84 | Junio C Hamano | 03 January 2012, 21:47:46 UTC | Merge branch 'maint-1.7.7' into maint * maint-1.7.7: docs: describe behavior of relative submodule URLs Documentation: read-tree --prefix works with existing subtrees Add MYMETA.json to perl/.gitignore | 03 January 2012, 21:47:46 UTC |
c07aa5b | Junio C Hamano | 03 January 2012, 21:47:15 UTC | Merge branch 'maint-1.7.6' into maint-1.7.7 * maint-1.7.6: Documentation: read-tree --prefix works with existing subtrees Add MYMETA.json to perl/.gitignore | 03 January 2012, 21:47:15 UTC |
9e6ed47 | Jens Lehmann | 01 January 2012, 15:13:16 UTC | docs: describe behavior of relative submodule URLs Since the relative submodule URLs have been introduced in f31a522a2d, they do not conform to the rules for resolving relative URIs but rather to those of relative directories. Document that behavior. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 03 January 2012, 20:47:58 UTC |
54440e1 | Brian Harring | 03 January 2012, 13:46:03 UTC | fix hang in git fetch if pointed at a 0 length bundle git-repo if interupted at the exact wrong time will generate zero length bundles- literal empty files. git-repo is wrong here, but git fetch shouldn't effectively spin loop if pointed at a zero length bundle. Signed-off-by: Brian Harring <ferringb@chromium.org> Helped-by: Johannes Sixt Helped-by: Nguyen Thai Ngoc Duy Signed-off-by: Junio C Hamano <gitster@pobox.com> | 03 January 2012, 20:13:28 UTC |
5c951ef | Clemens Buchacher | 31 December 2011, 11:50:56 UTC | Documentation: read-tree --prefix works with existing subtrees Since 34110cd4 (Make 'unpack_trees()' have a separate source and destination index) it is no longer true that a subdirectory with the same prefix must not exist. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 01 January 2012, 09:18:53 UTC |
0eddcbf | Jack Nagel | 29 December 2011, 04:42:05 UTC | Add MYMETA.json to perl/.gitignore ExtUtils::MakeMaker generates MYMETA.json in addition to MYMETA.yml since version 6.57_07. As it suggests, it is just meta information about the build and is cleaned up with 'make clean', so it should be ignored. Signed-off-by: Jack Nagel <jacknagel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 29 December 2011, 21:08:47 UTC |
f3f778d | Junio C Hamano | 28 December 2011, 19:49:09 UTC | Git 1.7.8.2 Contains accumulated fixes since 1.7.8 that have been merged to the 'master' branch in preparation for the 1.7.9 release. Signed-off-by: Junio C Hamano <gitster@pobox.com> | 28 December 2011, 20:03:24 UTC |
9a8e485 | Junio C Hamano | 28 December 2011, 20:03:19 UTC | Merge branch 'jv/maint-config-set' into maint * jv/maint-config-set: Fix an incorrect reference to --set-all. | 28 December 2011, 20:03:19 UTC |
0d57085 | Junio C Hamano | 28 December 2011, 19:49:37 UTC | Merge branch 'jk/follow-rename-score' into maint * jk/follow-rename-score: use custom rename score during --follow | 28 December 2011, 19:49:37 UTC |
9b0b0b4 | Junio C Hamano | 28 December 2011, 19:44:54 UTC | Merge branch 'jc/checkout-m-twoway' into maint * jc/checkout-m-twoway: t/t2023-checkout-m.sh: fix use of test_must_fail checkout_merged(): squelch false warning from some gcc Test 'checkout -m -- path' checkout -m: no need to insist on having all 3 stages | 28 December 2011, 19:44:54 UTC |
00754b2 | Junio C Hamano | 28 December 2011, 19:42:51 UTC | Merge branch 'tr/doc-sh-setup' into maint * tr/doc-sh-setup: git-sh-setup: make require_clean_work_tree part of the interface | 28 December 2011, 19:42:51 UTC |
b42e81a | Junio C Hamano | 28 December 2011, 19:42:46 UTC | Merge branch 'jk/maint-strbuf-missing-init' into maint * jk/maint-strbuf-missing-init: commit, merge: initialize static strbuf | 28 December 2011, 19:42:46 UTC |
4a242d6 | Junio C Hamano | 28 December 2011, 19:42:42 UTC | Merge branch 'jk/maint-push-v-is-verbose' into maint * jk/maint-push-v-is-verbose: make "git push -v" actually verbose | 28 December 2011, 19:42:42 UTC |
b5c1279 | Junio C Hamano | 28 December 2011, 19:42:37 UTC | Merge branch 'jk/http-push-to-empty' into maint * jk/http-push-to-empty: remote-curl: don't pass back fake refs Conflicts: remote-curl.c | 28 December 2011, 19:42:37 UTC |
81eaa06 | Junio C Hamano | 28 December 2011, 19:42:33 UTC | Merge branch 'jk/doc-fsck' into maint * jk/doc-fsck: docs: brush up obsolete bits of git-fsck manpage | 28 December 2011, 19:42:33 UTC |
23838b8 | Junio C Hamano | 28 December 2011, 19:42:27 UTC | Merge branch 'jc/maint-lf-to-crlf-keep-crlf' into maint * jc/maint-lf-to-crlf-keep-crlf: lf_to_crlf_filter(): resurrect CRLF->CRLF hack | 28 December 2011, 19:42:27 UTC |
e8f6b51 | Junio C Hamano | 28 December 2011, 19:42:24 UTC | Merge branch 'ef/setenv-putenv' into maint * ef/setenv-putenv: compat/setenv.c: error if name contains '=' compat/setenv.c: update errno when erroring out | 28 December 2011, 19:42:24 UTC |
3c06ab6 | Junio C Hamano | 28 December 2011, 19:32:39 UTC | Merge branch 'jc/advice-doc' into maint * jc/advice-doc: advice: Document that they all default to true | 28 December 2011, 19:32:39 UTC |
770dd00 | Junio C Hamano | 28 December 2011, 19:32:39 UTC | Merge branch 'jn/maint-sequencer-fixes' into maint * jn/maint-sequencer-fixes: revert: stop creating and removing sequencer-old directory Revert "reset: Make reset remove the sequencer state" revert: do not remove state until sequence is finished revert: allow single-pick in the middle of cherry-pick sequence revert: pass around rev-list args in already-parsed form revert: allow cherry-pick --continue to commit before resuming revert: give --continue handling its own function | 28 December 2011, 19:32:39 UTC |
7fc1495 | Junio C Hamano | 28 December 2011, 19:32:38 UTC | Merge branch 'jk/maint-snprintf-va-copy' into maint * jk/maint-snprintf-va-copy: compat/snprintf: don't look at va_list twice | 28 December 2011, 19:32:38 UTC |
f1c12e1 | Junio C Hamano | 28 December 2011, 19:32:37 UTC | Merge branch 'jk/maint-push-over-dav' into maint * jk/maint-push-over-dav: http-push: enable "proactive auth" t5540: test DAV push with authentication | 28 December 2011, 19:32:37 UTC |
699eb54 | Junio C Hamano | 28 December 2011, 19:32:36 UTC | Merge branch 'jk/maint-mv' into maint * jk/maint-mv: mv: be quiet about overwriting mv: improve overwrite warning mv: make non-directory destination error more clear mv: honor --verbose flag docs: mention "-k" for both forms of "git mv" | 28 December 2011, 19:32:36 UTC |
7a5638a | Junio C Hamano | 28 December 2011, 19:32:36 UTC | Merge branch 'jk/fetch-no-tail-match-refs' into maint * jk/fetch-no-tail-match-refs: connect.c: drop path_match function fetch-pack: match refs exactly t5500: give fully-qualified refs to fetch-pack drop "match" parameter from get_remote_heads | 28 December 2011, 19:32:36 UTC |
2cb1ff9 | Junio C Hamano | 28 December 2011, 19:32:36 UTC | Merge branch 'ew/keepalive' into maint * ew/keepalive: enable SO_KEEPALIVE for connected TCP sockets | 28 December 2011, 19:32:36 UTC |
4742949 | Junio C Hamano | 28 December 2011, 19:32:35 UTC | Merge branch 'ci/stripspace-docs' into maint * ci/stripspace-docs: Update documentation for stripspace | 28 December 2011, 19:32:35 UTC |
9ddb7ea | Junio C Hamano | 28 December 2011, 19:32:35 UTC | Merge branch 'jh/fast-import-notes' into maint * jh/fast-import-notes: fast-import: Fix incorrect fanout level when modifying existing notes refs t9301: Add 2nd testcase exposing bugs in fast-import's notes fanout handling t9301: Fix testcase covering up a bug in fast-import's notes fanout handling | 28 December 2011, 19:32:35 UTC |
d9d73b3 | Junio C Hamano | 28 December 2011, 19:32:34 UTC | Merge branch 'aw/rebase-i-stop-on-failure-to-amend' into maint * aw/rebase-i-stop-on-failure-to-amend: rebase -i: interrupt rebase when "commit --amend" failed during "reword" | 28 December 2011, 19:32:34 UTC |
4df989f | Junio C Hamano | 28 December 2011, 19:32:34 UTC | Merge branch 'tj/maint-imap-send-remove-unused' into maint * tj/maint-imap-send-remove-unused: imap-send: Remove unused 'use_namespace' variable | 28 December 2011, 19:32:34 UTC |
7958774 | Junio C Hamano | 28 December 2011, 19:32:33 UTC | Merge branch 'jn/branch-move-to-self' into maint * jn/branch-move-to-self: Allow checkout -B <current-branch> to update the current branch branch: allow a no-op "branch -M <current-branch> HEAD" | 28 December 2011, 19:32:33 UTC |
e39888b | Junio C Hamano | 28 December 2011, 19:32:33 UTC | Merge branch 'na/strtoimax' into maint * na/strtoimax: Support sizes >=2G in various config options accepting 'g' sizes. Compatibility: declare strtoimax() under NO_STRTOUMAX Add strtoimax() compatibility function. | 28 December 2011, 19:32:33 UTC |
786a961 | Junio C Hamano | 28 December 2011, 19:32:32 UTC | Merge branch 'jk/refresh-porcelain-output' into maint * jk/refresh-porcelain-output: refresh_index: make porcelain output more specific refresh_index: rename format variables read-cache: let refresh_cache_ent pass up changed flags | 28 December 2011, 19:32:32 UTC |
67e223e | Jelmer Vernooij | 27 December 2011, 02:03:45 UTC | Fix an incorrect reference to --set-all. Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 27 December 2011, 19:14:18 UTC |
2ce0edc | Junio C Hamano | 21 December 2011, 20:02:13 UTC | Git 1.7.8.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> | 21 December 2011, 20:02:13 UTC |
b43ba78 | Junio C Hamano | 21 December 2011, 19:42:45 UTC | Merge branch 'jl/submodule-status-failure-report' into maint * jl/submodule-status-failure-report: diff/status: print submodule path when looking for changes fails | 21 December 2011, 19:42:45 UTC |
f0b4fd4 | Junio C Hamano | 21 December 2011, 19:42:45 UTC | Merge branch 'tr/userdiff-c-returns-pointer' into maint * tr/userdiff-c-returns-pointer: userdiff: allow * between cpp funcname words | 21 December 2011, 19:42:45 UTC |
406cc9b | Junio C Hamano | 21 December 2011, 19:42:45 UTC | Merge branch 'bc/maint-apply-check-no-patch' into maint * bc/maint-apply-check-no-patch: builtin/apply.c: report error on failure to recognize input t/t4131-apply-fake-ancestor.sh: fix broken test | 21 December 2011, 19:42:45 UTC |
3bb8d69 | Junio C Hamano | 21 December 2011, 19:42:44 UTC | Merge branch 'cn/maint-lf-to-crlf-filter' into maint * cn/maint-lf-to-crlf-filter: lf_to_crlf_filter(): tell the caller we added "\n" when draining convert: track state in LF-to-CRLF filter | 21 December 2011, 19:42:44 UTC |
1a7bd4f | Junio C Hamano | 21 December 2011, 19:42:44 UTC | Merge branch 'jk/maint-upload-archive' into maint * jk/maint-upload-archive: archive: don't let remote clients get unreachable commits | 21 December 2011, 19:42:44 UTC |
a31275d | Carlos Martín Nieto | 21 December 2011, 18:14:09 UTC | clone: the -o option has nothing to do with <branch> It is to give an alternate <name> instead of "origin" to the remote we are cloning from. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 21 December 2011, 19:26:30 UTC |
967cf98 | Michael Schubert | 21 December 2011, 12:05:27 UTC | builtin/log: remove redundant initialization "abbrev" and "commit_format" in struct rev_info get initialized in init_revisions - no need to reinit in cmd_log_init_defaults. Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 21 December 2011, 19:15:56 UTC |
f1f509c | Junio C Hamano | 21 December 2011, 18:50:20 UTC | Merge branch 'ms/commit-cc-option-helpstring' into maint * ms/commit-cc-option-helpstring: builtin/commit: add missing '/' in help message | 21 December 2011, 18:50:20 UTC |
ee0400d | Michael Schubert | 21 December 2011, 14:56:00 UTC | builtin/commit: add missing '/' in help message Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 21 December 2011, 18:46:10 UTC |
97f261b | Ævar Arnfjörð Bjarmason | 20 December 2011, 23:27:41 UTC | builtin/init-db.c: eliminate -Wformat warning on Solaris On Solaris systems we'd warn about an implicit cast of mode_t when we printed things out with the %d format. We'd get this warning under GCC 4.6.0 with Solaris headers: builtin/init-db.c: In function ‘separate_git_dir’: builtin/init-db.c:354:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘mode_t’ [-Wformat] We've been doing this ever since v1.7.4.1-296-gb57fb80. Just work around this by adding an explicit cast. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 21 December 2011, 00:02:08 UTC |
d577cd2 | Thomas Rast | 20 December 2011, 21:42:39 UTC | git-sh-setup: make require_clean_work_tree part of the interface 92c62a3 (Porcelain scripts: Rewrite cryptic "needs update" error message, 2010-10-19) refactored git's own checking to a function in git-sh-setup. This is a very useful thing for script writers, so document it. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 20 December 2011, 22:01:41 UTC |
5cd7fad | Ævar Arnfjörð Bjarmason | 20 December 2011, 20:37:45 UTC | t/t2023-checkout-m.sh: fix use of test_must_fail Change an invocation of test_must_fail() to be inside a test_expect_success() as is our usual pattern. Having it outside caused our tests to fail under prove(1) since we wouldn't print a newline before TAP output: CONFLICT (content): Merge conflict in both.txt # GETTEXT POISON #ok 2 - -m restores 2-way conflicted+resolved file Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 20 December 2011, 21:24:02 UTC |
b13e3ea | Jakub Narebski | 18 December 2011, 22:00:58 UTC | gitweb: Fix fallback mode of to_utf8 subroutine e5d3de5 (gitweb: use Perl built-in utf8 function for UTF-8 decoding., 2007-12-04) was meant to make gitweb faster by using Perl's internals (see subsection "Messing with Perl's Internals" in Encode(3pm) manpage) Simple benchmark confirms that (old = 00f429a, new = this version): old new old -- -65% new 189% -- Unfortunately it made fallback mode of to_utf8 do not work... except for default value 'latin1' of $fallback_encoding ('latin1' is Perl native encoding), which is why it was not noticed for such long time. utf8::valid(STRING) is an internal function that tests whether STRING is in a _consistent state_ regarding UTF-8. It returns true is well-formed UTF-8 and has the UTF-8 flag on _*or*_ if string is held as bytes (both these states are 'consistent'). For gitweb the second option was true, as output from git commands is opened without ':utf8' layer. What made it work at all for STRING in 'latin1' encoding is the fact that utf8:decode(STRING) turns on UTF-8 flag only if source string is valid UTF-8 and contains multi-byte UTF-8 characters... and that if string doesn't have UTF-8 flag set it is treated as in native Perl encoding, i.e. 'latin1' / 'iso-8859-1' (unless native encoding it is EBCDIC ;-)). It was ':utf8' layer that actually converted 'latin1' (no UTF-8 flag == native == 'latin1) to 'utf8'. Let's make use of the fact that utf8:decode(STRING) returns false if STRING is invalid as UTF-8 to check whether to enable fallback mode. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 19 December 2011, 20:25:43 UTC |
02f7914 | Jeff King | 17 December 2011, 10:45:39 UTC | remote-curl: don't pass back fake refs When receive-pack advertises its list of refs, it generally hides the capabilities information after a NUL at the end of the first ref. However, when we have an empty repository, there are no refs, and therefore receive-pack writes a fake ref "capabilities^{}" with the capabilities afterwards. On the client side, git reads the result with get_remote_heads(). We pick the capabilities from the end of the line, and then call check_ref() to make sure the ref name is valid. We see that it isn't, and don't bother adding it to our list of refs. However, the call to check_ref() is enabled by passing the REF_NORMAL flag to get_remote_heads. For the regular git transport, we pass REF_NORMAL in get_refs_via_connect() if we are doing a push (since only receive-pack uses this fake ref). But in remote-curl, we never use this flag, and we accept the fake ref as a real one, passing it back from the helper to the parent git-push. Most of the time this bug goes unnoticed, as the fake ref won't match our refspecs. However, if "--mirror" is used, then we see it as remote cruft to be pruned, and try to pass along a deletion refspec for it. Of course this refspec has bogus syntax (because of the ^{}), and the helper complains, aborting the push. Let's have remote-curl mirror what the builtin get_refs_via_connect() does (at least for the case of using git protocol; we can leave the dumb info/refs reader as it is). This also fixes pushing with --mirror to a smart-http remote that uses alternates. The fake ".have" refs the server gives to avoid unnecessary network transfer has a similar bad interactions with the machinery. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 19 December 2011, 19:21:29 UTC |
26e94af | Junio C Hamano | 19 December 2011, 05:35:01 UTC | advice: Document that they all default to true By definition, the default value of "advice.*" variables must be true and they all control various additional help messages that are designed to aid new users. Setting one to false is to tell Git that the user understands the nature of the error and does not need the additional verbose help message. Also fix the asciidoc markup for linkgit:git-checkout[1] in the description of the detachedHead advice by removing an excess colon. Signed-off-by: Junio C Hamano <gitster@pobox.com> | 19 December 2011, 05:38:55 UTC |
8496f56 | Junio C Hamano | 16 December 2011, 23:44:18 UTC | lf_to_crlf_filter(): resurrect CRLF->CRLF hack The non-streaming version of the filter counts CRLF and LF in the whole buffer, and returns without doing anything when they match (i.e. what is recorded in the object store already uses CRLF). This was done to help people who added files from the DOS world before realizing they want to go cross platform and adding .gitattributes to tell Git that they only want CRLF in their working tree. The streaming version of the filter does not want to read the whole thing before starting to work, as that defeats the whole point of streaming. So we instead check what byte follows CR whenever we see one, and add CR before LF only when the LF does not immediately follow CR already to keep CRLF as is. Reported-and-tested-by: Ralf Thielow Signed-off-by: Junio C Hamano <gitster@pobox.com> | 19 December 2011, 04:40:41 UTC |
57cf4ad | Jürgen Kreileder | 17 December 2011, 09:22:23 UTC | gitweb: Output valid utf8 in git_blame_common('data') Otherwise when javascript-actions are enabled gitweb shown broken author names in the tooltips on blame pages ('blame_incremental' view). Signed-off-by: Jürgen Kreileder <jk@blackdown.de> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 19 December 2011, 03:44:52 UTC |
5d79105 | Jürgen Kreileder | 17 December 2011, 09:22:22 UTC | gitweb: esc_html() site name for title in OPML This escapes the site name in OPML (XML uses the same escaping rules as HTML). Also fixes encoding issues because esc_html() uses to_utf8(). Signed-off-by: Jürgen Kreileder <jk@blackdown.de> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 19 December 2011, 03:44:51 UTC |
168c1e0 | Jürgen Kreileder | 17 December 2011, 09:22:21 UTC | gitweb: Call to_utf8() on input string in chop_and_escape_str() a) To fix the comparison with the chopped string, otherwise we compare bytes with characters, as chop_str() must run to_utf8() for correct operation b) To give the title attribute correct encoding; we need to mark strings as UTF-8 before outpur Signed-off-by: Jürgen Kreileder <jk@blackdown.de> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 19 December 2011, 03:44:51 UTC |
03f94ae | Junio C Hamano | 18 December 2011, 08:27:59 UTC | Update jk/maint-strbuf-missing-init to builtin/ rename | 18 December 2011, 08:28:16 UTC |
2c47789 | Jeff King | 18 December 2011, 05:03:22 UTC | commit, merge: initialize static strbuf Strbufs cannot rely on static all-zero initialization; instead, they must use STRBUF_INIT to point to the "slopbuf". Without this patch, "git commit --no-message" segfaults reliably. Fix the same issue in builtin/merge.c as well. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 18 December 2011, 08:11:54 UTC |
bd2c86e | Jeff King | 17 December 2011, 09:37:15 UTC | make "git push -v" actually verbose Providing a single "-v" to "git push" currently does nothing. Giving two flags ("git push -v -v") turns on the first level of verbosity. This is caused by a regression introduced in 8afd8dc (push: support multiple levels of verbosity, 2010-02-24). Before the series containing 8afd8dc, the verbosity handling for fetching and pushing was completely separate. Commit bde873c refactored the verbosity handling out of the fetch side, and then 8afd8dc converted push to use the refactored code. However, the fetch and push sides numbered and passed along their verbosity levels differently. For both, a verbosity level of "-1" meant "quiet", and "0" meant "default output". But from there they differed. For fetch, a verbosity level of "1" indicated to the "fetch" program that it should make the status table slightly more verbose, showing up-to-date entries. A verbosity level of "2" meant that we should pass a verbose flag to the transport; in the case of fetch-pack, this displays protocol debugging information. As a result, the refactored code in bde873c checks for "verbosity >= 2", and only then passes it on to the transport. From the transport code's perspective, a verbosity of 0 or 1 both meant "0". Push, on the other hand, does not show its own status table; that is always handled by the transport layer or below (originally send-pack itself, but these days it is done by the transport code). So a verbosity level of 1 meant that we should pass the verbose flag to send-pack, so that it knows we want a verbose status table. However, once 8afd8dc switched it to the refactored fetch code, a verbosity level of 1 was now being ignored. Thus, you needed to artificially bump the verbosity to 2 (via "-v -v") to have any effect. We can fix this by letting the transport code know about the true verbosity level (i.e., let it distinguish level 0 or 1). We then have to also make an adjustment to any transport methods that assumed "verbose > 0" meant they could spew lots of debugging information. Before, they could only get "0" or "2", but now they will also receive "1". They need to adjust their condition for turning on such spew from "verbose > 0" to "verbose > 1". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 18 December 2011, 02:18:28 UTC |
2830308 | Jeff King | 16 December 2011, 11:33:10 UTC | docs: brush up obsolete bits of git-fsck manpage After the description and options, the fsck manpage contains some discussion about what it does. Over time, this discussion has become somewhat obsolete, both in content and formatting. In particular: 1. There are many options now, so starting the discussion with "It tests..." makes it unclear whether we are talking about the last option, or about the tool in general. Let's start a new "discussion" section and make our antecedent more clear. 2. It gave an example for --unreachable using for-each-ref to mention all of the heads, saying that it will do "a _lot_ of verification". This is hopelessly out-of-date, as giving no arguments will check much more (reflogs, the index, non-head refs). 3. It goes on to mention tests "to be added" (like tree object sorting). We now have these tests. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 17 December 2011, 00:24:35 UTC |
87afe9a | Junio C Hamano | 16 December 2011, 22:39:37 UTC | lf_to_crlf_filter(): tell the caller we added "\n" when draining This can only happen when the input size is multiple of the buffer size of the cascade filter (16k) and ends with an LF, but in such a case, the code forgot to tell the caller that it added the "\n" it could not add during the last round. Signed-off-by: Junio C Hamano <gitster@pobox.com> | 16 December 2011, 22:39:37 UTC |
dd98d88 | Jeff King | 16 December 2011, 11:27:50 UTC | use custom rename score during --follow If you provide a custom rename score on the command line, like: git log -M50 --follow foo.c it is completely ignored, and there is no way to --follow with a looser rename score. Instead, let's use the same rename score that will be used for generating diffs. This is convenient, and mirrors what we do with the break-score. You can see an example of it being useful in git.git: $ git log --oneline --summary --follow \ Documentation/technical/api-string-list.txt 86d4b52 string-list: Add API to remove an item from an unsorted list 1d2f80f string_list: Fix argument order for string_list_append e242148 string-list: add unsorted_string_list_lookup() 0dda1d1 Fix two leftovers from path_list->string_list c455c87 Rename path_list to string_list create mode 100644 Documentation/technical/api-string-list.txt $ git log --oneline --summary -M40 --follow \ Documentation/technical/api-string-list.txt 86d4b52 string-list: Add API to remove an item from an unsorted list 1d2f80f string_list: Fix argument order for string_list_append e242148 string-list: add unsorted_string_list_lookup() 0dda1d1 Fix two leftovers from path_list->string_list c455c87 Rename path_list to string_list rename Documentation/technical/{api-path-list.txt => api-string-list.txt} (47%) 328a475 path-list documentation: document all functions and data structures 530e741 Start preparing the API documents. create mode 100644 Documentation/technical/api-path-list.txt You could have two separate rename scores, one for following and one for diff. But almost nobody is going to want that, and it would just be unnecessarily confusing. Besides which, we re-use the diff results from try_to_follow_renames for the actual diff output, which means having them as separate scores is actively wrong. E.g., with the current code, you get: $ git log --oneline --diff-filter=R --name-status \ -M90 --follow git.spec.in 27dedf0 GIT 0.99.9j aka 1.0rc3 R084 git-core.spec.in git.spec.in f85639c Rename the RPM from "git" to "git-core" R098 git.spec.in git-core.spec.in The first one should not be considered a rename by the -M score we gave, but we print it anyway, since we blindly re-use the diff information from the follow (which uses the default score). So this could also be considered simply a bug-fix, as with the current code "-M" is completely ignored when using "--follow". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 16 December 2011, 20:33:49 UTC |
335c6e4 | Junio C Hamano | 15 December 2011, 18:10:11 UTC | checkout_merged(): squelch false warning from some gcc gcc 4.6.2 (there may be others) does not realize that the variable "mode" can never be used uninitialized in this function and issues a false warning under -Wuninitialized option. Squelch it with an unnecessary initialization; it is not like a single assignment matters to the performance in this codepath that writes out to the filesystem with checkout_entry() anyway. Signed-off-by: Junio C Hamano <gitster@pobox.com> | 15 December 2011, 18:10:11 UTC |
6ac1b2a | Erik Faye-Lund | 14 December 2011, 14:07:09 UTC | compat/setenv.c: error if name contains '=' According to POSIX, setenv should error out with EINVAL if it's asked to set an environment variable whose name contains an equals sign. Implement this detail in our compatibility-fallback. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> | 15 December 2011, 03:31:03 UTC |