summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-08-08Merge branch 'nd/cache-tree-ita' into maintLibravatar Junio C Hamano15-53/+87
"git add -N dir/file && git write-tree" produced an incorrect tree when there are other paths in the same directory that sorts after "file". * nd/cache-tree-ita: cache-tree: do not generate empty trees as a result of all i-t-a subentries cache-tree.c: fix i-t-a entry skipping directory updates sometimes test-lib.sh: introduce and use $EMPTY_BLOB test-lib.sh: introduce and use $EMPTY_TREE
2016-08-08Merge branch 'mh/blame-worktree' into maintLibravatar Junio C Hamano2-18/+71
"git blame file" allowed the lineage of lines in the uncommitted, unadded contents of "file" to be inspected, but it refused when "file" did not appear in the current commit. When "file" was created by renaming an existing file (but the change has not been committed), this restriction was unnecessarily tight. * mh/blame-worktree: t/t8003-blame-corner-cases.sh: Use here documents blame: allow to blame paths freshly added to the index
2016-07-28Some fixes for 2.9.3Libravatar Junio C Hamano2-1/+59
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-28Merge branch 'ak/lazy-prereq-mktemp' into maintLibravatar Junio C Hamano1-1/+6
A test that unconditionally used "mktemp" learned that the command is not necessarily available everywhere. * ak/lazy-prereq-mktemp: t7610: test for mktemp before test execution
2016-07-28Merge branch 'nd/icase' into maintLibravatar Junio C Hamano11-21/+291
"git grep -i" has been taught to fold case in non-ascii locales correctly. * nd/icase: grep.c: reuse "icase" variable diffcore-pickaxe: support case insensitive match on non-ascii diffcore-pickaxe: Add regcomp_or_die() grep/pcre: support utf-8 gettext: add is_utf8_locale() grep/pcre: prepare locale-dependent tables for icase matching grep: rewrite an if/else condition to avoid duplicate expression grep/icase: avoid kwsset when -F is specified grep/icase: avoid kwsset on literal non-ascii strings test-regex: expose full regcomp() to the command line test-regex: isolate the bug test code grep: break down an "if" stmt in preparation for next changes
2016-07-28Merge branch 'sb/submodule-parallel-fetch' into maintLibravatar Junio C Hamano1-16/+27
Fix recently introduced codepaths that are involved in parallel submodule operations, which gave up on reading too early, and could have wasted CPU while attempting to write under a corner case condition. * sb/submodule-parallel-fetch: hoist out handle_nonblock function for xread and xwrite xwrite: poll on non-blocking FDs xread: retry after poll on EAGAIN/EWOULDBLOCK
2016-07-28Merge branch 'dk/blame-move-no-reason-for-1-line-context' into maintLibravatar Junio C Hamano1-4/+3
"git blame -M" missed a single line that was moved within the file. * dk/blame-move-no-reason-for-1-line-context: blame: require 0 context lines while finding moved lines with -M
2016-07-28Merge branch 'jk/test-match-signal' into maintLibravatar Junio C Hamano3-11/+26
The test framework learned a new helper test_match_signal to check an exit code from getting killed by an expected signal. * jk/test-match-signal: t/lib-git-daemon: use test_match_signal test_must_fail: use test_match_signal t0005: use test_match_signal as appropriate tests: factor portable signal check out of t0005
2016-07-28Merge branch 'js/am-call-theirs-theirs-in-fallback-3way' into maintLibravatar Junio C Hamano1-8/+8
One part of "git am" had an oddball helper function that called stuff from outside "his" as opposed to calling what we have "ours", which was not gender-neutral and also inconsistent with the rest of the system where outside stuff is usuall called "theirs" in contrast to "ours". * js/am-call-theirs-theirs-in-fallback-3way: am: counteract gender bias
2016-07-28Merge branch 'js/t3404-grammo-fix' into maintLibravatar Junio C Hamano1-1/+1
Grammofix. * js/t3404-grammo-fix: t3404: fix a grammo (commands are ran -> commands are run)
2016-07-28Merge branch 'nd/doc-new-command' into maintLibravatar Junio C Hamano1-1/+1
Typofix in a doc. * nd/doc-new-command: new-command.txt: correct the command description file
2016-07-28Merge branch 'ew/gc-auto-pack-limit-fix' into maintLibravatar Junio C Hamano1-1/+1
"gc.autoPackLimit" when set to 1 should not trigger a repacking when there is only one pack, but the code counted poorly and did so. * ew/gc-auto-pack-limit-fix: gc: fix off-by-one error with gc.autoPackLimit
2016-07-28Merge branch 'js/color-on-windows-comment' into maintLibravatar Junio C Hamano1-5/+0
For a long time, we carried an in-code comment that said our colored output would work only when we use fprintf/fputs on Windows, which no longer is the case for the past few years. * js/color-on-windows-comment: color.h: remove obsolete comment about limitations on Windows
2016-07-28Merge branch 'mm/doc-tt' into maintLibravatar Junio C Hamano62-227/+228
More mark-up updates to typeset strings that are expected to literally typed by the end user in fixed-width font. * mm/doc-tt: doc: typeset HEAD and variants as literal CodingGuidelines: formatting HEAD in documentation doc: typeset long options with argument as literal doc: typeset '--' as literal doc: typeset long command-line options as literal doc: typeset short command-line options as literal Documentation/git-mv.txt: fix whitespace indentation
2016-07-28Merge branch 'js/sign-empty-commit-fix' into maintLibravatar Junio C Hamano1-1/+6
"git commit --amend --allow-empty-message -S" for a commit without any message body could have misidentified where the header of the commit object ends. * js/sign-empty-commit-fix: commit -S: avoid invalid pointer with empty message
2016-07-28Merge branch 'ps/rebase-i-auto-unstash-upon-abort' into maintLibravatar Junio C Hamano2-0/+32
"git rebase -i --autostash" did not restore the auto-stashed change when the operation was aborted. * ps/rebase-i-auto-unstash-upon-abort: rebase -i: restore autostash on abort
2016-07-28Merge branch 'nd/ita-cleanup' into maintLibravatar Junio C Hamano2-3/+61
Git does not know what the contents in the index should be for a path added with "git add -N" yet, so "git grep --cached" should not show hits (or show lack of hits, with -L) in such a path, but that logic does not apply to "git grep", i.e. searching in the working tree files. But we did so by mistake, which has been corrected. * nd/ita-cleanup: grep: fix grepping for "intent to add" files t7810-grep.sh: fix a whitespace inconsistency t7810-grep.sh: fix duplicated test name
2016-07-28Merge branch 'js/find-commit-subject-ignore-leading-blanks' into maintLibravatar Junio C Hamano7-15/+31
A helper function that takes the contents of a commit object and finds its subject line did not ignore leading blank lines, as is commonly done by other codepaths. Make it ignore leading blank lines to match. * js/find-commit-subject-ignore-leading-blanks: reset --hard: skip blank lines when reporting the commit subject sequencer: use skip_blank_lines() to find the commit subject commit -C: skip blank lines at the beginning of the message commit.c: make find_commit_subject() more robust pretty: make the skip_blank_lines() function public
2016-07-28Merge branch 'dg/subtree-rebase-test' into maintLibravatar Junio C Hamano1-0/+119
Add a test to specify the desired behaviour that currently is not available in "git rebase -Xsubtree=...". * dg/subtree-rebase-test: contrib/subtree: Add a test for subtree rebase that loses commits
2016-07-18t/t8003-blame-corner-cases.sh: Use here documentsLibravatar Mike Hommey1-17/+17
Somehow, this test was using: { echo A echo B } > file block to feed file contents. This changes those to the form most common in git test scripts: cat >file <<-\EOF A B EOF Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-18blame: allow to blame paths freshly added to the indexLibravatar Mike Hommey2-1/+54
When blaming files, changes in the work tree are taken into account and displayed as being "Not Committed Yet". However, when blaming a file that is not known to the current HEAD, git blame fails with `no such path 'foo' in HEAD`, even when the file was git add'ed. Allowing such a blame is useful when the new file added to the index (not yet committed) was created by renaming an existing file. It also is useful when the new file was created from pieces already in HEAD, moved or copied from other files and blaming with copy detection (i.e. "-C"). Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-18cache-tree: do not generate empty trees as a result of all i-t-a subentriesLibravatar Nguyễn Thái Ngọc Duy2-1/+23
If a subdirectory contains nothing but i-t-a entries, we generate an empty tree object and add it to its parent tree. Which is wrong. Such a subdirectory should not be added. Note that this has a cascading effect. If subdir 'a/b/c' contains nothing but i-t-a entries, we ignore it. But then if 'a/b' contains only (the non-existing) 'a/b/c', then we should ignore 'a/b' while building 'a' too. And it goes all the way up to top directory. Noticed-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-18cache-tree.c: fix i-t-a entry skipping directory updates sometimesLibravatar Nguyễn Thái Ngọc Duy2-2/+19
Commit 3cf773e (cache-tree: fix writing cache-tree when CE_REMOVE is present - 2012-12-16) skips i-t-a entries when building trees objects from the index. Unfortunately it may skip too much. The code in question checks if an entry is an i-t-a one, then no tree entry will be written. But it does not take into account that directories can also be written with the same code. Suppose we have this in the index. a-file subdir/file1 subdir/file2 subdir/file3 the-last-file We write an entry for a-file as normal and move on to subdir/file1, where we realize the entry name for this level is simply just "subdir", write down an entry for "subdir" then jump three items ahead to the-last-file. That is what happens normally when the first file in subdir is not an i-t-a entry. If subdir/file1 is an i-t-a, because of the broken condition in this code, we still think "subdir" is an i-t-a file and not writing "subdir" down and jump to the-last-file. The result tree now only has two items: a-file and the-last-file. subdir should be there too (even though it only records two sub-entries, file2 and file3). If the i-t-a entry is subdir/file2 or subdir/file3, this is not a problem because we jump over them anyway. Which may explain why the bug is hidden for nearly four years. Fix it by making sure we only skip i-t-a entries when the entry in question is actual an index entry, not a directory. Reported-by: Yuri Kanivetsky <yuri.kanivetsky@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-18test-lib.sh: introduce and use $EMPTY_BLOBLibravatar Nguyễn Thái Ngọc Duy8-38/+35
Similar to $EMPTY_TREE this makes it easier to recognize this special SHA-1 and change hash later. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-18test-lib.sh: introduce and use $EMPTY_TREELibravatar Nguyễn Thái Ngọc Duy6-13/+11
This is a special SHA1. Let's keep it at one place, easier to replace later when the hash change comes, easier to recognize. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-15Git 2.9.2Libravatar Junio C Hamano4-3/+17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-15Merge branch 'jk/tzoffset-fix' into maintLibravatar Junio C Hamano3-3/+18
Skip tests that are unrunnable on platforms without 64-bit long to avoid unnecessary test failures. * jk/tzoffset-fix: t0006: skip "far in the future" test when unsigned long is not long enough
2016-07-15t0006: skip "far in the future" test when unsigned long is not long enoughLibravatar Jeff King3-3/+18
Git's source code refers to timestamps as unsigned longs. On 32-bit platforms, as well as on Windows, unsigned long is not large enough to capture dates that are "absurdly far in the future". While we can fix this issue properly by replacing unsigned long with a larger type, we want to be a bit more conservative and just skip those tests on the maint track. Signed-off-by: Jeff King <peff@peff.net> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-11Git 2.9.1Libravatar Junio C Hamano3-2/+58
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-11Merge branch 'jc/t2300-setup' into maintLibravatar Junio C Hamano1-1/+9
Portability fix for Windows. * jc/t2300-setup: t2300: "git --exec-path" is not usable in $PATH on Windows as-is
2016-07-11Merge branch 'cb/t7810-test-label-fix' into maintLibravatar Junio C Hamano1-1/+1
Test clean-up. * cb/t7810-test-label-fix: t7810: fix duplicated test title
2016-07-11Merge branch 'sb/t5614-modernize' into maintLibravatar Junio C Hamano1-50/+20
Test clean-up. * sb/t5614-modernize: t5614: don't use subshells
2016-07-11Merge branch 'jn/preformatted-doc-url' into maintLibravatar Junio C Hamano1-2/+2
The top level documentation "git help git" still pointed at the documentation set hosted at now-defunct google-code repository. Update it to point to https://git.github.io/htmldocs/git.html instead. * jn/preformatted-doc-url: doc: git-htmldocs.googlecode.com is no more
2016-07-11Merge branch 'ao/p4-has-branch-prefix-fix' into maintLibravatar Junio C Hamano1-1/+1
A bug, which caused "git p4" while running under verbose mode to report paths that are omitted due to branch prefix incorrectly, has been fixed; the command said "Ignoring file outside of prefix" for paths that are _inside_. * ao/p4-has-branch-prefix-fix: git-p4: correct hasBranchPrefix verbose output
2016-07-11Merge branch 'js/perf-on-apple' into maintLibravatar Junio C Hamano2-1/+7
t/perf needs /usr/bin/time with GNU extension; the invocation of it is updated to "gtime" on Darwin. * js/perf-on-apple: perf: accommodate for MacOSX
2016-07-11Merge branch 'ak/t7800-wo-readlink' into maintLibravatar Junio C Hamano1-1/+1
One among four invocations of readlink(1) in our test suite has been rewritten so that the test can run on systems without the command (others are in valgrind test framework and t9802). * ak/t7800-wo-readlink: t7800: readlink may not be available
2016-07-11Merge branch 'jk/tzoffset-fix' into maintLibravatar Junio C Hamano3-17/+71
The internal code used to show local timezone offset is not prepared to handle timestamps beyond year 2100, and gave a bogus offset value to the caller. Use a more benign looking +0000 instead and let "git log" going in such a case, instead of aborting. * jk/tzoffset-fix: local_tzoffset: detect errors from tm_to_time_t t0006: test various date formats t0006: rename test-date's "show" to "relative"
2016-07-11Merge branch 'js/mingw-parameter-less-c-functions' into maintLibravatar Junio C Hamano3-6/+6
Some platform-specific code had non-ANSI strict declarations of C functions that do not take any parameters, which has been corrected. * js/mingw-parameter-less-c-functions: mingw: let the build succeed with DEVELOPER=1
2016-07-11Merge branch 'lc/shell-default-value-noexpand' into maintLibravatar Junio C Hamano1-3/+3
Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}' to set the default value, without enclosing it in double quotes. * lc/shell-default-value-noexpand: sh-setup: enclose setting of ${VAR=default} in double-quotes
2016-07-11Merge branch 'sb/clone-shallow-passthru' into maintLibravatar Junio C Hamano3-8/+21
Fix an unintended regression in v2.9 that breaks "clone --depth" that recurses down to submodules by forcing the submodules to also be cloned shallowly, which many server instances that host upstream of the submodules are not prepared for. * sb/clone-shallow-passthru: clone: do not let --depth imply --shallow-submodules
2016-07-11Merge branch 'mg/signature-doc' into maintLibravatar Junio C Hamano2-0/+187
Formats of the various data (and how to validate them) where we use GPG signature have been documented. * mg/signature-doc: Documentation/technical: signed merge tag format Documentation/technical: signed commit format Documentation/technical: signed tag format Documentation/technical: describe signature formats
2016-07-11Merge branch 'jk/bisect-show-tree' into maintLibravatar Junio C Hamano1-0/+1
"git bisect" makes an internal call to "git diff-tree" when bisection finds the culprit, but this call did not initialize the data structure to pass to the diff-tree API correctly. * jk/bisect-show-tree: bisect: always call setup_revisions after init_revisions
2016-07-11Merge branch 'km/fetch-do-not-free-remote-name' into maintLibravatar Junio C Hamano1-4/+2
The ownership rule for the piece of memory that hold references to be fetched in "git fetch" was screwy, which has been cleaned up. * km/fetch-do-not-free-remote-name: builtin/fetch.c: don't free remote->name after fetch
2016-07-11Merge branch 'nd/graph-width-padded' into maintLibravatar Junio C Hamano6-1/+80
"log --graph --format=" learned that "%>|(N)" specifies the width relative to the terminal's left edge, not relative to the area to draw text that is to the right of the ancestry-graph section. It also now accepts negative N that means the column limit is relative to the right border. * nd/graph-width-padded: pretty.c: support <direction>|(<negative number>) forms pretty: pass graph width to pretty formatting for use in '%>|(N)'
2016-07-11Merge branch 'jk/add-i-diff-compact-heuristics' into maintLibravatar Junio C Hamano1-0/+4
"git add -i/-p" learned to honor diff.compactionHeuristic experimental knob, so that the user can work on the same hunk split as "git diff" output. * jk/add-i-diff-compact-heuristics: add--interactive: respect diff.compactionHeuristic
2016-07-11hoist out handle_nonblock function for xread and xwriteLibravatar Eric Wong1-28/+20
At least for me, this improves the readability of xread and xwrite; hopefully allowing missing "continue" statements to be spotted more easily. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-08am: counteract gender biasLibravatar Johannes Schindelin1-8/+8
Since 47f0b6d5 (Fall back to three-way merge when applying a patch., 2005-10-06), i.e. for almost 11 years already, we used a male form to describe "the other tree". While it was unintended, this gave the erroneous impression as if the Git developers thought of users as male, and were unaware of the important role in software development played by female actors such as Ada Lovelace, Grace Hopper and Margaret Hamilton. In fact, the first professional software developers were all female. Let's change those unfortunate references to the gender neutral "their tree". Doing so also makes the fallback_merge_recursive(), which is an oddball, more in line with the other parts of the system where we contrast what we have vs what we obtain from others by saying "ours" vs "theirs". This inconsistency was also unintended. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-06More fixes for 2.9.1Libravatar Junio C Hamano1-0/+34
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-06Merge branch 'jc/deref-tag' into maintLibravatar Junio C Hamano2-6/+3
Code clean-up. * jc/deref-tag: blame, line-log: do not loop around deref_tag()
2016-07-06Merge branch 'pb/strbuf-read-file-doc' into maintLibravatar Junio C Hamano1-0/+2
Minor doc update. * pb/strbuf-read-file-doc: strbuf: describe the return value of strbuf_read_file