summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-08-08Merge branch 'jk/parseopt-string-list'Libravatar Junio C Hamano1-1/+1
A small memory leak in the command line parsing of "git blame" has been plugged. * jk/parseopt-string-list: blame: drop strdup of string literal
2016-08-08Merge branch 'jh/clean-smudge-f-doc'Libravatar Junio C Hamano1-0/+5
A minor documentation update. * jh/clean-smudge-f-doc: clarify %f documentation
2016-08-08Merge branch 'js/nedmalloc-gcc6-warnings'Libravatar Junio C Hamano1-9/+8
Squelch compiler warnings for netmalloc (in compat/) library. * js/nedmalloc-gcc6-warnings: nedmalloc: work around overzealous GCC 6 warning nedmalloc: fix misleading indentation
2016-08-08Merge branch 'nd/fbsd-lazy-mtime'Libravatar Junio C Hamano1-1/+16
FreeBSD can lie when asked mtime of a directory, which made the untracked cache code to fall back to a slow-path, which in turn caused tests in t7063 to fail because it wanted to verify the behaviour of the fast-path. * nd/fbsd-lazy-mtime: t7063: work around FreeBSD's lazy mtime update feature
2016-08-08Merge branch 'nd/log-decorate-color-head-arrow'Libravatar Junio C Hamano2-3/+1
An entry "git log --decorate" for the tip of the current branch is shown as "HEAD -> name" (where "name" is the name of the branch); paint the arrow in the same color as "HEAD", not in the color for commits. * nd/log-decorate-color-head-arrow: log: decorate HEAD -> branch with the same color for arrow and HEAD
2016-08-08Merge branch 'rs/use-strbuf-addstr'Libravatar Junio C Hamano7-9/+9
* rs/use-strbuf-addstr: use strbuf_addstr() instead of strbuf_addf() with "%s" use strbuf_addstr() for adding constant strings to a strbuf
2016-08-08Merge branch 'rs/st-mult'Libravatar Junio C Hamano3-3/+3
Micro optimization of st_mult() facility used to check the integer overflow coming from multiplication to compute size of memory allocation. * rs/st-mult: pass constants as first argument to st_mult()
2016-08-08Merge branch 'ib/t3700-add-chmod-x-updates'Libravatar Junio C Hamano1-39/+26
The t3700 test about "add --chmod=-x" have been made a bit more robust and generally cleaned up. * ib/t3700-add-chmod-x-updates: t3700: add a test_mode_in_index helper function t3700: merge two tests into one t3700: remove unwanted leftover files before running new tests
2016-08-08Merge branch 'ab/gitweb-link-html-escape'Libravatar Junio C Hamano1-1/+1
The characters in the label shown for tags/refs for commits in "gitweb" output are now properly escaped for proper HTML output. * ab/gitweb-link-html-escape: gitweb: escape link body in format_ref_marker
2016-08-08Merge branch 'jk/pack-objects-optim'Libravatar Junio C Hamano8-50/+248
"git pack-objects" has a few options that tell it not to pack objects found in certain packfiles, which require it to scan .idx files of all available packs. The codepaths involved in these operations have been optimized for a common case of not having any non-local pack and/or any .kept pack. * jk/pack-objects-optim: pack-objects: compute local/ignore_pack_keep early pack-objects: break out of want_object loop early find_pack_entry: replace last_found_pack with MRU cache add generic most-recently-used list sha1_file: drop free_pack_by_name t/perf: add tests for many-pack scenarios
2016-08-08Merge branch 'jk/difftool-in-subdir'Libravatar Junio C Hamano2-59/+41
"git difftool <paths>..." started in a subdirectory failed to interpret the paths relative to that directory, which has been fixed. * jk/difftool-in-subdir: difftool: use Git::* functions instead of passing around state difftool: avoid $GIT_DIR and $GIT_WORK_TREE difftool: fix argument handling in subdirs
2016-08-08Merge branch 'va/i18n'Libravatar Junio C Hamano4-24/+112
More i18n marking. * va/i18n: i18n: config: unfold error messages marked for translation i18n: notes: mark comment for translation
2016-08-08Merge branch 'js/rebase-i-progress-tidy'Libravatar Junio C Hamano1-1/+1
Regression fix for an i18n topic already in 'master'. * js/rebase-i-progress-tidy: rebase-interactive: trim leading whitespace from progress count
2016-08-08Merge branch 'jk/reflog-date'Libravatar Junio C Hamano6-10/+57
The reflog output format is documented better, and a new format --date=unix to report the seconds-since-epoch (without timezone) has been added. * jk/reflog-date: date: clarify --date=raw description date: add "unix" format date: document and test "raw-local" mode doc/pretty-formats: explain shortening of %gd doc/pretty-formats: describe index/time formats for %gd doc/rev-list-options: explain "-g" output formats doc/rev-list-options: clarify "commit@{Nth}" for "-g" option
2016-08-08Merge branch 'cp/completion-clone-recurse-submodules'Libravatar Junio C Hamano1-0/+1
* cp/completion-clone-recurse-submodules: completion: add option '--recurse-submodules' to 'git clone'
2016-08-08Merge branch 'jk/t4205-cleanup'Libravatar Junio C Hamano1-198/+200
Test modernization. * jk/t4205-cleanup: t4205: indent here documents t4205: drop top-level &&-chaining
2016-08-08Merge branch 'da/subtree-modernize'Libravatar Junio C Hamano1-286/+391
Style fixes for "git subtree" (in contrib/). * da/subtree-modernize: subtree: adjust function definitions to match CodingGuidelines subtree: adjust style to match CodingGuidelines
2016-08-08Merge branch 'nd/fetch-ref-summary'Libravatar Junio C Hamano1-2/+2
Hotfix of a test in a topic that has already been merged to 'master'. * nd/fetch-ref-summary: t5510: skip tests under GETTEXT_POISON build
2016-08-08Merge branch 'ew/git-svn-http-tests'Libravatar Junio C Hamano10-91/+30
Tests for "git svn" have been taught to reuse the lib-httpd test infrastructure when testing the subversion integration that interacts with subversion repositories served over the http:// protocol. * ew/git-svn-http-tests: git svn: migrate tests to use lib-httpd t/t91*: do not say how to avoid the tests
2016-08-08Merge branch 'js/t4130-rename-without-ino'Libravatar Junio C Hamano1-3/+7
Windows port was failing some tests in t4130, due to the lack of inum in the returned values by its lstat(2) emulation. * js/t4130-rename-without-ino: t4130: work around Windows limitation
2016-08-05nedmalloc: work around overzealous GCC 6 warningLibravatar René Scharfe1-5/+4
With GCC 6, the strdup() function is declared with the "nonnull" attribute, stating that it is not allowed to pass a NULL value as parameter. In nedmalloc()'s reimplementation of strdup(), Postel's Law is heeded and NULL parameters are handled gracefully. GCC 6 complains about that now because it thinks that NULL cannot be passed to strdup() anyway. Because the callers in this project of strdup() must be prepared to call any implementation of strdup() supplied by the platform, so it is pointless to pretend that it is OK to call it with NULL. Remove the conditional based on NULL-ness of the input; this squelches the warning. Check the return value of malloc() instead to make sure we actually got the memory to write to. See https://gcc.gnu.org/gcc-6/porting_to.html for details. Diagnosed-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-05use strbuf_addstr() instead of strbuf_addf() with "%s"Libravatar René Scharfe3-3/+3
Call strbuf_addstr() for adding a simple string to a strbuf instead of using the heavier strbuf_addf(). This is shorter and documents the intent more clearly. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-04Tenth batch for 2.10Libravatar Junio C Hamano1-0/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-04Merge branch 'jc/grep-commandline-vs-configuration'Libravatar Junio C Hamano4-16/+29
"git -c grep.patternType=extended log --basic-regexp" misbehaved because the internal API to access the grep machinery was not designed well. * jc/grep-commandline-vs-configuration: grep: further simplify setting the pattern type
2016-08-04Merge branch 'sb/submodule-clone-retry'Libravatar Junio C Hamano2-12/+12
An earlier tweak to make "submodule update" retry a failing clone of submodules was buggy and caused segfault, which has been fixed. * sb/submodule-clone-retry: submodule-helper: fix indexing in clone retry error reporting path git-submodule: forward exit code of git-submodule--helper more faithfully
2016-08-04Merge branch 'sb/pack-protocol-doc-nak'Libravatar Junio C Hamano1-1/+1
A doc update. * sb/pack-protocol-doc-nak: Documentation: pack-protocol correct NAK response
2016-08-04nedmalloc: fix misleading indentationLibravatar Johannes Schindelin1-4/+4
Some code in nedmalloc is indented in a funny way that could be misinterpreted as if a line after a for loop was included in the loop body, when it is not. GCC 6 complains about this in DEVELOPER=YepSure mode. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-04t7063: work around FreeBSD's lazy mtime update featureLibravatar Nguyễn Thái Ngọc Duy1-1/+16
Let's start with the commit message of [1] from freebsd.git [2] Sync timestamp changes for inodes of special files to disk as late as possible (when the inode is reclaimed). Temporarily only do this if option UFS_LAZYMOD configured and softupdates aren't enabled. UFS_LAZYMOD is intentionally left out of /sys/conf/options. This is mainly to avoid almost useless disk i/o on battery powered machines. It's silly to write to disk (on the next sync or when the inode becomes inactive) just because someone hit a key or something wrote to the screen or /dev/null. PR: 5577 [3] The short version of that, in the context of t7063, is that when a directory is updated, its mtime may be updated later, not immediately. This can be shown with a simple command sequence date; sleep 1; touch abc; rm abc; sleep 10; ls -lTd . One would expect that the date shown in `ls` would be one second from `date`, but it's 10 seconds later. If we put another `ls -lTd .` in front of `sleep 10`, then the date of the last `ls` comes as expected. The first `ls` somehow forces mtime to be updated. t7063 is really sensitive to directory mtime. When mtime is too "new", git code suspects racy timestamps and will not trigger the shortcut in untracked cache, in t7063.24 and eventually be detected in t7063.27 We have two options thanks to this special FreeBSD feature: 1) Stop supporting untracked cache on FreeBSD. Skip t7063 entirely when running on FreeBSD 2) Work around this problem (using the same 'ls' trick) and continue to support untracked cache on FreeBSD I initially wanted to go with 1) because I didn't know the exact nature of this feature and feared that it would make untracked cache work unreliably, using the cached version when it should not. Since the behavior of this thing is clearer now. The picture is not that bad. If this indeed happens often, untracked cache would assume racy condition more often and _fall back_ to non-untracked cache code paths. Which means it may be less effective, but it will not show wrong things. This patch goes with option 2. PS. For those who want to look further in FreeBSD source code, this flag is now called IN_LAZYMOD. I can see it's effective in ext2 and ufs. zfs is not affected. [1] 660e6408e6df99a20dacb070c5e7f9739efdf96d [2] git://github.com/freebsd/freebsd.git [3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=5577 Reported-by: Eric Wong <e@80x24.org> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-03Ninth batch of topics for 2.10Libravatar Junio C Hamano1-0/+61
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-03Merge branch 'jk/diff-do-not-reuse-wtf-needs-cleaning'Libravatar Junio C Hamano2-0/+18
There is an optimization used in "git diff $treeA $treeB" to borrow an already checked-out copy in the working tree when it is known to be the same as the blob being compared, expecting that open/mmap of such a file is faster than reading it from the object store, which involves inflating and applying delta. This however kicked in even when the checked-out copy needs to go through the convert-to-git conversion (including the clean filter), which defeats the whole point of the optimization. The optimization has been disabled when the conversion is necessary. * jk/diff-do-not-reuse-wtf-needs-cleaning: diff: do not reuse worktree files that need "clean" conversion
2016-08-03Merge branch 'rs/submodule-config-code-cleanup'Libravatar Junio C Hamano3-17/+28
Code cleanup. * rs/submodule-config-code-cleanup: submodule-config: fix test binary crashing when no arguments given submodule-config: combine early return code into one goto submodule-config: passing name reference for .gitmodule blobs submodule-config: use explicit empty string instead of strbuf in config_from()
2016-08-03Merge branch 'jk/push-progress'Libravatar Junio C Hamano9-64/+202
"git push" and "git clone" learned to give better progress meters to the end user who is waiting on the terminal. * jk/push-progress: receive-pack: send keepalives during quiet periods receive-pack: turn on connectivity progress receive-pack: relay connectivity errors to sideband receive-pack: turn on index-pack resolving progress index-pack: add flag for showing delta-resolution progress clone: use a real progress meter for connectivity check check_connected: add progress flag check_connected: relay errors to alternate descriptor check_everything_connected: use a struct with named options check_everything_connected: convert to argv_array rev-list: add optional progress reporting check_everything_connected: always pass --quiet to rev-list
2016-08-03Merge branch 'jt/fetch-large-handshake-window-on-http'Libravatar Junio C Hamano1-7/+12
"git fetch" exchanges batched have/ack messages between the sender and the receiver, initially doubling every time and then falling back to enlarge the window size linearly. The "smart http" transport, being an half-duplex protocol, outgrows the preset limit too quickly and becomes inefficient when interacting with a large repository. The internal mechanism learned to grow the window size more aggressively when working with the "smart http" transport. * jt/fetch-large-handshake-window-on-http: fetch-pack: grow stateless RPC windows exponentially
2016-08-03Merge branch 'jk/git-jump'Libravatar Junio C Hamano2-3/+11
"git jump" script (in contrib/) has been updated a bit. * jk/git-jump: contrib/git-jump: fix typo in README contrib/git-jump: add whitespace-checking mode contrib/git-jump: fix greedy regex when matching hunks
2016-08-03Merge branch 'mm/status-suggest-merge-abort'Libravatar Junio C Hamano3-2/+10
"git status" learned to suggest "merge --abort" during a conflicted merge, just like it already suggests "rebase --abort" during a conflicted rebase. * mm/status-suggest-merge-abort: status: suggest 'git merge --abort' when appropriate
2016-08-03Merge branch 'jk/parse-options-concat'Libravatar Junio C Hamano3-22/+22
Users of the parse_options_concat() API function need to allocate extra slots in advance and fill them with OPT_END() when they want to decide the set of supported options dynamically, which makes the code error-prone and hard to read. This has been corrected by tweaking the API to allocate and return a new copy of "struct option" array. * jk/parse-options-concat: parse_options: allocate a new array when concatenating
2016-08-03Merge branch 'sb/push-options'Libravatar Junio C Hamano13-23/+294
"git push" learned to accept and pass extra options to the receiving end so that hooks can read and react to them. * sb/push-options: add a test for push options push: accept push options receive-pack: implement advertising and receiving push options push options: {pre,post}-receive hook learns about push options
2016-08-03Merge branch 'ew/http-walker'Libravatar Junio C Hamano3-31/+206
Dumb http transport on the client side has been optimized. * ew/http-walker: list: avoid incompatibility with *BSD sys/queue.h http-walker: reduce O(n) ops with doubly-linked list http: avoid disconnecting on 404s for loose objects http-walker: remove unused parameter from fetch_object
2016-08-03Merge branch 'pm/build-persistent-https-with-recent-go'Libravatar Junio C Hamano1-2/+4
The build procedure for "git persistent-https" helper (in contrib/) has been updated so that it can be built with more recent versions of Go. * pm/build-persistent-https-with-recent-go: contrib/persistent-https: use Git version for build label contrib/persistent-https: update ldflags syntax for Go 1.7+
2016-08-03Merge branch 'da/subtree-2.9-regression'Libravatar Junio C Hamano2-8/+25
"git merge" in Git v2.9 was taught to forbid merging an unrelated lines of history by default, but that is exactly the kind of thing the "--rejoin" mode of "git subtree" (in contrib/) wants to do. "git subtree" has been taught to use the "--allow-unrelated-histories" option to override the default. * da/subtree-2.9-regression: subtree: fix "git subtree split --rejoin" t7900-subtree.sh: fix quoting and broken && chains
2016-08-03Merge branch 'os/no-verify-skips-commit-msg-too'Libravatar Junio C Hamano1-1/+1
"git commit --help" said "--no-verify" is only about skipping the pre-commit hook, and failed to say that it also skipped the commit-msg hook. * os/no-verify-skips-commit-msg-too: commit: describe that --no-verify skips the commit-msg hook in the help text
2016-08-03clarify %f documentationLibravatar Joey Hess1-0/+5
It's natural to expect %f to be an actual file on disk; help avoid that mistake. Signed-off-by: Joey Hess <joeyh@joeyh.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-03blame: drop strdup of string literalLibravatar Eric Sunshine1-1/+1
This strdup was added as part of 58dbfa2 (blame: accept multiple -L ranges, 2013-08-06) to be consistent with parse_opt_string_list(), which appends to the same list. But as of 7a7a517 (parse_opt_string_list: stop allocating new strings, 2016-06-13), we should stop using strdup (to match parse_opt_string_list, and for all the reasons described in that commit; namely that it does nothing useful and causes us to leak the memory). Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-03t4130: work around Windows limitationLibravatar Johannes Sixt1-3/+7
On Windows, it is already pretty expensive to try to recreate the stat() data that Git assumes is cheap to obtain. To make things halfway decent in performance, we even have to skip emulating the inode and to determine the number of hard links. This is not a huge problem, usually, as either the size or the mtime or the ctime are tell-tale enough to say when a file has changed, and even if not, those changes are typically made after the index file was written, triggering a rehashing of the files' contents. The t4130-apply-criss-cross-rename test case, however, requires the inode to determine that files of equal size were swapped, as renaming files does not update their mtime. Every once in a while, t4130 fails on Windows because of this missing piece. Equal file sizes are not crucial for the test cases, however. Hence, generate files with different sizes so that there is some property that the swapped files can be discovered reliably even on Windows. Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-01t3700: add a test_mode_in_index helper functionLibravatar Ingo Brückl1-32/+22
The case statement to check the file mode of a staged file appears a number of times. Simplify the test by utilizing a test_mode_in_index helper function. Signed-off-by: Ingo Brückl <ib@wupperonline.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-01t3700: merge two tests into oneLibravatar Ingo Brückl1-12/+6
Depending on the underlying platform a chmod may be a noop. Although it wouldn't harm the result of the '--chmod=-x' test, there is a more robust way to make sure the --chmod option works both ways. Merge the two separate tests for the --chmod option into one, checking both permissions on the same file. Signed-off-by: Ingo Brückl <ib@wupperonline.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-01t3700: remove unwanted leftover files before running new testsLibravatar Ingo Brückl1-0/+3
When an earlier test that has prerequisite is skipped, files used by later tests may be left in the working tree in an unexpected state. For example, a test runs this sequence: echo foo >xfoo1 && chmod 755 xfoo1 to create an executable file xfoo1, expecting that xfoo1 does not exist before it runs in the test sequence. However, the absence of this file depends on "git reset --hard" done in an earlier test, that is skipped when SANITY prerequisite is not met, and worse yet, xfoo1 originally is created as a symbolic link, which means the chmod does not affect the modes of xfoo1 as this test expects. Fix this by starting the test with "rm -f xfoo1" to make sure the file is created from scratch, and do the same to other similar tests. Signed-off-by: Ingo Brückl <ib@wupperonline.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-01pass constants as first argument to st_mult()Libravatar René Scharfe3-3/+3
The result of st_mult() is the same no matter the order of its arguments. It invokes the macro unsigned_mult_overflows(), which divides the second parameter by the first one. Pass constants first to allow that division to be done already at compile time. Signed-off-by: Rene Scharfe <l.s.r@web.de> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-01use strbuf_addstr() for adding constant strings to a strbufLibravatar René Scharfe4-6/+6
Replace uses of strbuf_addf() for adding strings with more lightweight strbuf_addstr() calls. In http-push.c it becomes easier to see what's going on without having to verfiy that the definition of PROPFIND_ALL_REQUEST doesn't contain any format specifiers. Signed-off-by: Rene Scharfe <l.s.r@web.de> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-01gitweb: escape link body in format_ref_markerLibravatar Andreas Brauchli1-1/+1
Fix a case where an html link can be generated from unescaped input resulting in invalid strict xhtml or potentially injected code. An overview of a repo with a tag "1.0.0&0.0.1" would previously result in an unescaped ampersand in the link body. Signed-off-by: Andreas Brauchli <a.brauchli@elementarea.net> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>