summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-08Merge branch 'rs/pull-signed-tag' into maintLibravatar Junio C Hamano4-12/+33
When "git merge-recursive" works on history with many criss-cross merges in "verbose" mode, the names the command assigns to the virtual merge bases could have overwritten each other by unintended reuse of the same piece of memory. * rs/pull-signed-tag: commit: use FLEX_ARRAY in struct merge_remote_desc merge-recursive: fix verbose output for multiple base trees commit: factor out set_merge_remote_desc() commit: use xstrdup() in get_merge_parent()
2016-09-08Merge branch 'js/test-lint-pathname' into maintLibravatar Junio C Hamano1-1/+10
The "t/" hierarchy is prone to get an unusual pathname; "make test" has been taught to make sure they do not contain paths that cannot be checked out on Windows (and the mechanism can be reusable to catch pathnames that are not portable to other platforms as need arises). * js/test-lint-pathname: t/Makefile: ensure that paths are valid on platforms we care
2016-09-08Merge branch 'js/mv-dir-to-new-directory' into maintLibravatar Junio C Hamano1-4/+7
"git mv dir non-existing-dir/" did not work in some environments the same way as existing mainstream platforms. The code now moves "dir" to "non-existing-dir", without relying on rename("A", "B/") that strips the trailing slash of '/'. * js/mv-dir-to-new-directory: git mv: do not keep slash in `git mv dir non-existing-dir/`
2016-09-08Merge branch 'js/import-tars-hardlinks' into maintLibravatar Junio C Hamano1-11/+20
"import-tars" fast-import script (in contrib/) used to ignore a hardlink target and replaced it with an empty file, which has been corrected to record the same blob as the other file the hardlink is shared with. * js/import-tars-hardlinks: import-tars: support hard links
2016-09-08Merge branch 'ms/document-pack-window-memory-is-per-thread' into maintLibravatar Junio C Hamano2-4/+6
* ms/document-pack-window-memory-is-per-thread: document git-repack interaction of pack.threads and pack.windowMemory
2016-09-08Merge branch 'jk/push-force-with-lease-creation' into maintLibravatar Junio C Hamano4-7/+46
"git push --force-with-lease" already had enough logic to allow ensuring that such a push results in creation of a ref (i.e. the receiving end did not have another push from sideways that would be discarded by our force-pushing), but didn't expose this possibility to the users. It does so now. * jk/push-force-with-lease-creation: t5533: make it pass on case-sensitive filesystems push: allow pushing new branches with --force-with-lease push: add shorthand for --force-with-lease branch creation Documentation/git-push: fix placeholder formatting
2016-09-08Merge branch 'jk/reflog-date' into maintLibravatar 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-09-08Merge branch 'jc/renormalize-merge-kill-safer-crlf' into maintLibravatar Junio C Hamano10-90/+112
"git merge" with renormalization did not work well with merge-recursive, due to "safer crlf" conversion kicking in when it shouldn't. * jc/renormalize-merge-kill-safer-crlf: merge: avoid "safer crlf" during recording of merge results convert: unify the "auto" handling of CRLF
2016-09-08Merge branch 'jk/common-main' into maintLibravatar Junio C Hamano53-153/+126
There are certain house-keeping tasks that need to be performed at the very beginning of any Git program, and programs that are not built-in commands had to do them exactly the same way as "git" potty does. It was easy to make mistakes in one-off standalone programs (like test helpers). A common "main()" function that calls cmd_main() of individual program has been introduced to make it harder to make mistakes. * jk/common-main: mingw: declare main()'s argv as const common-main: call git_setup_gettext() common-main: call restore_sigpipe_to_default() common-main: call sanitize_stdfds() common-main: call git_extract_argv0_path() add an extra level of indirection to main()
2016-08-16t/Makefile: ensure that paths are valid on platforms we careLibravatar Johannes Schindelin1-1/+10
Some pathnames that are okay on ext4 and on HFS+ cannot be checked out on Windows. Tests that want to see operations on such paths on filesystems that support them must do so behind appropriate test prerequisites, and must not include them in the source tree (instead they should create them when they run). Otherwise, the source tree cannot even be checked out. Make sure that double-quotes, asterisk, colon, greater/less-than, question-mark, backslash, tab, vertical-bar, as well as any non-ASCII characters never appear in the pathnames with a new test-lint-* target as part of a `make test`. To that end, we call `git ls-files` (ensuring that the paths are quoted properly), relying on the fact that paths containing non-ASCII characters are quoted within double-quotes. In case that the source code does not actually live in a Git repository (e.g. when extracted from a .zip file), or that the `git` executable cannot be executed, we simply ignore the error for now; In that case, our trusty Continuous Integration will be the last line of defense and catch any problematic file name. Noticed when a topic wanted to add a pathname with '>' in it. A check like this will prevent a similar problems from happening in the future. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-13commit: use FLEX_ARRAY in struct merge_remote_descLibravatar René Scharfe2-3/+2
Convert the name member of struct merge_remote_desc to a FLEX_ARRAY and use FLEX_ALLOC_STR to build the struct. This halves the number of memory allocations, saves the storage for a pointer and avoids an indirection when reading the name. Suggested-by: Jeff King <peff@peff.net> 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-13merge-recursive: fix verbose output for multiple base treesLibravatar René Scharfe2-4/+19
One of the indirect callers of make_virtual_commit() passes the result of oid_to_hex() as the name, i.e. a pointer to a static buffer. Since the function uses that string pointer directly in building a struct merge_remote_desc, multiple entries can end up sharing the same name inadvertently. Fix that by calling set_merge_remote_desc(), which creates a copy of the string, instead of building the struct by hand. 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-13commit: factor out set_merge_remote_desc()Libravatar René Scharfe2-7/+14
Export a helper function for allocating, populating and attaching a merge_remote_desc to a commit. 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-13commit: use xstrdup() in get_merge_parent()Libravatar René Scharfe1-1/+1
Handle allocation errors for the name member just like we already do for the struct merge_remote_desc itself. 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-12Git 2.9.3Libravatar Junio C Hamano3-2/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-12Merge branch 'jk/difftool-in-subdir' into maintLibravatar 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-12Merge branch 'jk/reset-ident-time-per-commit' into maintLibravatar Junio C Hamano3-0/+8
Not-so-recent rewrite of "git am" that started making internal calls into the commit machinery had an unintended regression, in that no matter how many seconds it took to apply many patches, the resulting committer timestamp for the resulting commits were all the same. * jk/reset-ident-time-per-commit: am: reset cached ident date for each patch
2016-08-10Yet another batch for 2.9.3Libravatar Junio C Hamano1-0/+68
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-10Merge branch 'jh/clean-smudge-f-doc' into maintLibravatar Junio C Hamano1-0/+5
A minor documentation update. This was split out from a stalled jh/clean-smudge-annex topic before discarding it. * jh/clean-smudge-f-doc: clarify %f documentation
2016-08-10Merge branch 'rs/use-strbuf-addstr' into maintLibravatar 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-10Merge branch 'cp/completion-clone-recurse-submodules' into maintLibravatar Junio C Hamano1-0/+1
* cp/completion-clone-recurse-submodules: completion: add option '--recurse-submodules' to 'git clone'
2016-08-10Merge branch 'jk/t4205-cleanup' into maintLibravatar Junio C Hamano1-198/+200
Test modernization. * jk/t4205-cleanup: t4205: indent here documents t4205: drop top-level &&-chaining
2016-08-10Merge branch 'jc/hashmap-doc-init' into maintLibravatar Junio C Hamano1-0/+5
The API documentation for hashmap was unclear if hashmap_entry can be safely discarded without any other consideration. State that it is safe to do so. * jc/hashmap-doc-init: hashmap: clarify that hashmap_entry can safely be discarded
2016-08-10Merge branch 'js/nedmalloc-gcc6-warnings' into maintLibravatar 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-10Merge branch 'nd/fbsd-lazy-mtime' into maintLibravatar 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-10Merge branch 'ab/gitweb-link-html-escape' into maintLibravatar 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-10Merge branch 'js/t4130-rename-without-ino' into maintLibravatar 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-10Merge branch 'jc/grep-commandline-vs-configuration' into maintLibravatar 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-10Merge branch 'jk/diff-do-not-reuse-wtf-needs-cleaning' into maintLibravatar 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-10Merge branch 'pm/build-persistent-https-with-recent-go' into maintLibravatar 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-10Merge branch 'da/subtree-2.9-regression' into maintLibravatar 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-10Merge branch 'os/no-verify-skips-commit-msg-too' into maintLibravatar 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-10Merge branch 'rs/rm-strbuf-optim' into maintLibravatar Junio C Hamano1-2/+3
The use of strbuf in "git rm" to build filename to remove was a bit suboptimal, which has been fixed. * rs/rm-strbuf-optim: rm: reuse strbuf for all remove_dir_recursively() calls
2016-08-10Merge branch 'jk/parse-options-concat' into maintLibravatar 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-10Merge branch 'ls/travis-enable-httpd-tests' into maintLibravatar Junio C Hamano1-0/+2
Allow http daemon tests in Travis CI tests. * ls/travis-enable-httpd-tests: travis-ci: enable web server tests t55xx on Linux
2016-08-10Merge branch 'ew/autoconf-pthread' into maintLibravatar Junio C Hamano1-0/+5
Existing autoconf generated test for the need to link with pthread library did not check all the functions from pthread libraries; recent FreeBSD has some functions in libc but not others, and we mistakenly thought linking with libc is enough when it is not. * ew/autoconf-pthread: configure.ac: stronger test for pthread linkage
2016-08-10Merge branch 'rs/help-c-source-with-gitattributes' into maintLibravatar Junio C Hamano1-1/+1
The .c/.h sources are marked as such in our .gitattributes file so that "git diff -W" and friends would work better. * rs/help-c-source-with-gitattributes: .gitattributes: set file type for C files
2016-08-10Merge branch 'mm/status-suggest-merge-abort' into maintLibravatar 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-10document git-repack interaction of pack.threads and pack.windowMemoryLibravatar Michael Stahl2-4/+6
Signed-off-by: Michael Stahl <mstahl@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-08Hopefully final batch for 2.9.3Libravatar Junio C Hamano1-0/+34
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-08Merge branch 'sb/pack-protocol-doc-nak' into maintLibravatar Junio C Hamano1-1/+1
A doc update. * sb/pack-protocol-doc-nak: Documentation: pack-protocol correct NAK response
2016-08-08Merge branch 'rs/submodule-config-code-cleanup' into maintLibravatar 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-08Merge branch 'sb/submodule-deinit-all' into maintLibravatar Junio C Hamano1-2/+0
A comment update for a topic that was merged to Git v2.8. * sb/submodule-deinit-all: submodule deinit: remove outdated comment
2016-08-08Merge branch 'rs/worktree-use-strbuf-absolute-path' into maintLibravatar Junio C Hamano1-2/+2
Code simplification. * rs/worktree-use-strbuf-absolute-path: worktree: use strbuf_add_absolute_path() directly
2016-08-08Merge branch 'jc/doc-diff-filter-exclude' into maintLibravatar Junio C Hamano1-0/+3
Belated doc update for a feature added in v1.8.5. * jc/doc-diff-filter-exclude: diff: document diff-filter exclusion
2016-08-08Merge branch 'nd/test-helpers' into maintLibravatar Junio C Hamano2-11/+3
Build clean-up. * nd/test-helpers: t/test-lib.sh: fix running tests with --valgrind Makefile: use VCSSVN_LIB to refer to svn library Makefile: drop extra dependencies for test helpers
2016-08-08Merge branch 'rs/use-strbuf-addbuf' into maintLibravatar Junio C Hamano5-8/+11
Code cleanup. * rs/use-strbuf-addbuf: strbuf: avoid calling strbuf_grow() twice in strbuf_addbuf() use strbuf_addbuf() for appending a strbuf to another
2016-08-08Merge branch 'lf/recv-sideband-cleanup' into maintLibravatar Junio C Hamano1-74/+58
Code simplification. * lf/recv-sideband-cleanup: sideband.c: small optimization of strbuf usage sideband.c: refactor recv_sideband()
2016-08-08Merge branch 'ah/unpack-trees-advice-messages' into maintLibravatar Junio C Hamano4-16/+16
Grammofix. * ah/unpack-trees-advice-messages: unpack-trees: fix English grammar in do-this-before-that messages
2016-08-08Merge branch 'lf/sideband-returns-void' into maintLibravatar Junio C Hamano3-15/+10
A small internal API cleanup. * lf/sideband-returns-void: upload-pack.c: make send_client_data() return void sideband.c: make send_sideband() return void