summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Documentation: use {asterisk} in rev-list-options.txt when neededcn/maint-rev-list-docCarlos Martín Nieto2012-02-281-6/+6
| | | | | | | | | | | | | | Text between two '*' is emphasized in AsciiDoc and makes explanations in rev-list-options.txt on glob-related options very confusing, as the rendered text would be missing two asterisks and the text between them would be emphasized instead. Use '{asterisk}' where needed to make them show up as asterisks in the rendered text. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.7.8.5v1.7.8.5Junio C Hamano2012-02-263-2/+21
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* grep -P: Fix matching ^ and $Michał Kiedrowicz2012-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When "git grep" is run with -P/--perl-regexp, it doesn't match ^ and $ at the beginning/end of the line. This is because PCRE normally matches ^ and $ at the beginning/end of the whole text, not for each line, and "git grep" passes a large chunk of text (possibly containing many lines) to pcre_exec() and then splits the text into lines. This makes "git grep -P" behave differently from "git grep -E" and also from "grep -P" and "pcregrep": $ cat file a b $ git grep --no-index -P '^ ' file $ git grep --no-index -E '^ ' file file: b $ grep -c -P '^ ' file b $ pcregrep -c '^ ' file b Reported-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* am: don't infloop for an empty input fileJim Meyering2012-02-262-1/+11
| | | | | | | | | | git-am.sh's check_patch_format function would attempt to preview the patch to guess its format, but would go into an infinite loop when the patch file happened to be empty. The solution: exit the loop when "read" fails, not when the line var, "$l1" becomes empty. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase -m: only call "notes copy" when rewritten exists and is non-emptyAndrew Wong2012-02-261-4/+7
| | | | | | | This prevents a shell error complaining rebase-merge/rewritten doesn't exist. Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Makefile: add thread-utils.h to LIB_HDmitry V. Levin2012-02-261-0/+1
| | | | | | | | | Starting with commit v1.7.8-165-g0579f91, grep.h includes thread-utils.h, so the latter has to be added to LIB_H. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Acked-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Sync with 1.7.6.6Junio C Hamano2012-02-052-24/+2
|\ | | | | | | | | | | * maint-1.7.7: Git 1.7.6.6 imap-send: remove dead code
| * Sync with 1.7.6.6Junio C Hamano2012-02-052-24/+2
| |\ | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * Git 1.7.6.6v1.7.6.6maint-1.7.6Junio C Hamano2012-02-052-2/+3
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * imap-send: remove dead codeJeff King2012-02-051-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Git 1.7.8.4v1.7.8.4Junio C Hamano2012-01-183-3/+9
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint-1.7.7' into maintJunio C Hamano2012-01-183-0/+14
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | * maint-1.7.7: Git 1.7.7.6 diff-index: enable recursive pathspec matching in unpack_trees Conflicts: GIT-VERSION-GEN
| * | Git 1.7.7.6v1.7.7.6Junio C Hamano2012-01-182-1/+5
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | diff-index: enable recursive pathspec matching in unpack_treesNguyen Thai Ngoc Duy2012-01-182-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Update draft release notes to 1.7.8.4Junio C Hamano2012-01-121-0/+5
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint-1.7.7' into maintJunio C Hamano2012-01-123-2/+17
|\ \ \ | |/ / | | | | | | | | | | | | | | | * 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
| * | Update draft release notes to 1.7.7.6Junio C Hamano2012-01-121-0/+5
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge branch 'maint-1.7.6' into maint-1.7.7Junio C Hamano2012-01-122-2/+12
| |\ \ | | |/ | | | | | | | | | | | | * maint-1.7.6: Update draft release notes to 1.7.6.6 thin-pack: try harder to use preferred base objects as base
| | * Update draft release notes to 1.7.6.6Junio C Hamano2012-01-121-0/+5
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * thin-pack: try harder to use preferred base objects as baseJeff King2012-01-121-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'maint-1.7.7' into maintJunio C Hamano2012-01-112-1/+2
|\ \ \ | |/ / | | | | | | | | | | | | * maint-1.7.7: attr: fix leak in free_attr_elem t2203: fix wrong commit command
| * | Merge branch 'maint-1.7.6' into maint-1.7.7Junio C Hamano2012-01-112-1/+2
| |\ \ | | |/ | | | | | | | | | | | | * maint-1.7.6: attr: fix leak in free_attr_elem t2203: fix wrong commit command
| | * attr: fix leak in free_attr_elemJeff King2012-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * t2203: fix wrong commit commandNguyễn Thái Ngọc Duy2012-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Prepare for 1.7.8.4Junio C Hamano2012-01-102-1/+15
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge the attributes fix in from maint-1.6.7 branchJunio C Hamano2012-01-105-33/+77
|\ \ \ | |/ / | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Prepare for 1.7.7.6Junio C Hamano2012-01-102-1/+12
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Merge the attributes fix in from maint-1.6.6 branchJunio C Hamano2012-01-104-33/+66
| |\ \ | | |/ | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * Prepare for 1.7.6.6Junio C Hamano2012-01-102-1/+12
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * Documentation: rerere's rr-cache auto-creation and rerere.enabledJunio C Hamano2012-01-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * attr.c: clarify the logic to pop attr_stackJunio C Hamano2012-01-101-1/+10
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * attr.c: make bootstrap_attr_stack() leave earlyJunio C Hamano2012-01-101-30/+31
| | | | | | | | | | | | | | | | | | | | | 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>
| | * attr: drop misguided defensive codingJeff King2012-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * attr: don't confuse prefixes with leading directoriesJeff King2012-01-102-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | send-email: multiedit is a boolean config optionJeff King2012-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Git 1.7.8.3v1.7.8.3Junio C Hamano2012-01-064-3/+22
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jn/maint-gitweb-utf8-fix' into maintJunio C Hamano2012-01-061-4/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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()
| * | | gitweb: Fix fallback mode of to_utf8 subroutinejn/maint-gitweb-utf8-fixJakub Narebski2011-12-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | gitweb: Output valid utf8 in git_blame_common('data')Jürgen Kreileder2011-12-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | gitweb: esc_html() site name for title in OPMLJürgen Kreileder2011-12-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | gitweb: Call to_utf8() on input string in chop_and_escape_str()Jürgen Kreileder2011-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge branch 'maint-1.7.7' into maintJunio C Hamano2012-01-061-4/+4
|\ \ \ \ | | |/ / | |/| | | | | | | | | | * maint-1.7.7: Documentation: rerere.enabled is the primary way to configure rerere
| * | | Merge branch 'maint-1.7.6' into maint-1.7.7Junio C Hamano2012-01-061-4/+4
| |\ \ \ | | | |/ | | |/| | | | | | | | | * maint-1.7.6: Documentation: rerere.enabled is the primary way to configure rerere
| | * | Documentation: rerere.enabled is the primary way to configure rerereThomas Rast2012-01-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | t5550: repack everything into one fileClemens Buchacher2012-01-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge branch 'nd/maint-parse-depth' into maintJunio C Hamano2012-01-041-2/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * nd/maint-parse-depth: Catch invalid --depth option passed to clone or fetch
| * | | | Catch invalid --depth option passed to clone or fetchnd/maint-parse-depthNguyễn Thái Ngọc Duy2012-01-041-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint-1.7.7' into maintJunio C Hamano2012-01-033-6/+11
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | Merge branch 'maint-1.7.6' into maint-1.7.7Junio C Hamano2012-01-032-5/+5
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | * maint-1.7.6: Documentation: read-tree --prefix works with existing subtrees Add MYMETA.json to perl/.gitignore
| | * | | Documentation: read-tree --prefix works with existing subtreesClemens Buchacher2012-01-011-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>