Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-06Merge branch 'cc/perf-run-config'Junio C Hamano
* cc/perf-run-config: perf: store subsection results in "test-results/$GIT_PERF_SUBSECTION/" perf/run: show name of rev being built perf/run: add run_subsection() perf/run: update get_var_from_env_or_config() for subsections perf/run: add get_subsections() perf/run: add calls to get_var_from_env_or_config() perf/run: add GIT_PERF_DIRS_OR_REVS perf/run: add get_var_from_env_or_config() perf/run: add '--config' option to the 'run' script
2017-12-06Merge branch 'sb/submodule-recursive-checkout-detach-head'Junio C Hamano
"git checkout --recursive" may overwrite and rewind the history of the branch that happens to be checked out in submodule repositories, which might not be desirable. Detach the HEAD but still allow the recursive checkout to succeed in such a case. * sb/submodule-recursive-checkout-detach-head: Documentation/checkout: clarify submodule HEADs to be detached recursive submodules: detach HEAD from new state
2017-12-06Prepare for 2.15.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-06Merge branch 'jc/merge-base-fork-point-doc' into maintJunio C Hamano
Clarify and enhance documentation for "merge-base --fork-point", as it was clear what it computed but not why/what for. * jc/merge-base-fork-point-doc: merge-base --fork-point doc: clarify the example and failure modes
2017-12-06Merge branch 'tz/redirect-fix' into maintJunio C Hamano
A few scripts (both in production and tests) incorrectly redirected their error output. These have been corrected. * tz/redirect-fix: rebase: fix stderr redirect in apply_autostash() t/lib-gpg: fix gpgconf stderr redirect to /dev/null
2017-12-06Merge branch 'tz/notes-error-to-stderr' into maintJunio C Hamano
"git notes" sent its error message to its standard output stream, which was corrected. * tz/notes-error-to-stderr: notes: send "Automatic notes merge failed" messages to stderr
2017-12-06Merge branch 'sb/test-cherry-pick-submodule-getting-in-a-way' into maintJunio C Hamano
The three-way merge performed by "git cherry-pick" was confused when a new submodule was added in the meantime, which has been fixed (or "papered over"). * sb/test-cherry-pick-submodule-getting-in-a-way: merge-recursive: handle addition of submodule on our side of history t/3512: demonstrate unrelated submodule/file conflict as cherry-pick failure
2017-12-06Merge branch 'pw/sequencer-recover-from-unlockable-index' into maintJunio C Hamano
The sequencer machinery (used by "git cherry-pick A..B", and "git rebase -i", among other things) would have lost a commit if stopped due to an unlockable index file, which has been fixed. * pw/sequencer-recover-from-unlockable-index: sequencer: reschedule pick if index can't be locked
2017-12-06Merge branch 'rs/apply-inaccurate-eof-with-incomplete-line' into maintJunio C Hamano
"git apply --inaccurate-eof" when used with "--ignore-space-change" triggered an internal sanity check, which has been fixed. * rs/apply-inaccurate-eof-with-incomplete-line: apply: update line lengths for --inaccurate-eof
2017-12-06Merge branch 'tz/complete-branch-copy' into maintJunio C Hamano
Command line completion (in contrib/) has been taught about the "--copy" option of "git branch". * tz/complete-branch-copy: completion: add '--copy' option to 'git branch'
2017-12-06Merge branch 'ew/rebase-mboxrd' into maintJunio C Hamano
When "git rebase" prepared an mailbox of changes and fed it to "git am" to replay them, it was confused when a stray "From " happened to be in the log message of one of the replayed changes. This has been corrected. * ew/rebase-mboxrd: rebase: use mboxrd format to avoid split errors
2017-12-06Merge branch 'sd/branch-copy' into maintJunio C Hamano
Code clean-up. * sd/branch-copy: config: avoid "write_in_full(fd, buf, len) != len" pattern
2017-12-06Merge branch 'sw/pull-ipv46-passthru' into maintJunio C Hamano
Contrary to the documentation, "git pull -4/-6 other-args" did not ask the underlying "git fetch" to go over IPv4/IPv6, which has been corrected. * sw/pull-ipv46-passthru: pull: pass -4/-6 option to 'git fetch'
2017-12-06Merge branch 'bc/submitting-patches-in-asciidoc' into maintJunio C Hamano
The SubmittingPatches document has been converted to produce an HTML version via AsciiDoc/Asciidoctor. * bc/submitting-patches-in-asciidoc: Documentation: convert SubmittingPatches to AsciiDoc Documentation: enable compat-mode for Asciidoctor
2017-12-06Merge branch 'mh/avoid-rewriting-packed-refs' into maintJunio C Hamano
Recent update to the refs infrastructure implementation started rewriting packed-refs file more often than before; this has been optimized again for most trivial cases. * mh/avoid-rewriting-packed-refs: files-backend: don't rewrite the `packed-refs` file unnecessarily t1409: check that `packed-refs` is not rewritten unnecessarily
2017-12-06t2020: test variations that matterJunio C Hamano
Because our test suite is not about validating the working of the shell, it is pointless to test variations of how a literal string 'yes' is quoted when assigned to an environment variable. Instead, test various ways to spell 'yes' (we use strcasecmp() so uppercased and capitalized variant should work just like 'yes' spelled in all lowercase) and make sure we take them as 'yes'. That is more relevant in testing Git. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-06t4013: test new output from diff --abbrev --rawAnn T Ropea
Use newly-introduced finely-grained control to teach the diff-family to honor the new environment GIT_PRINT_SHA1_ELLIPSIS and remove the ellipses when it is not set. Mentored-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ann T Ropea <bedhanger@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-06diff: diff_aligned_abbrev: remove ellipsis after abbreviated SHA-1 valueAnn T Ropea
Neither Git nor the user are in need of this (visual) aid anymore, but we must offer a transition period. A follow-up patch (series) will rectify the situation by covering the new output format as well as the backward compatible one. Also, fix a typo: "abbbreviated" ---> "abbreviated". Signed-off-by: Ann T Ropea <bedhanger@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-06t4013: prepare for upcoming "diff --raw --abbrev" output format changeAnn T Ropea
Most of the t4013 tests go through a list of sample command lines, and each of them is executed and its output compared with an expected one stored in t4013/ directory. Allow these lines to begin with a colon followed by magic word(s) so that test conditions can easily be tweaked. The expected use that will happen in later steps of this is to run tests expecting the traditional output and run the same test without the GIT_PRINT_SHA1_ELLIPSIS=yes environment exported for (perhaps some of) them, which will have to expect different output. Since all of the existing tests are meant to run with the environment, use the magic word "noellipses" to cause the variable not to be set and exported. As this step does not add any new test with the magic word, all tests still run with the environment variable, expecting the traditional output, but it will change soon. Based-on-patch-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ann T Ropea <bedhanger@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-06checkout: describe_detached_head: remove ellipsis after committishAnn T Ropea
We do not want an ellipsis displayed following an (abbreviated) SHA-1 value. The days when this was necessary to indicate the truncation to lower-level Git commands and/or the user are bygone. However, to ease the transition, the ellipsis will still be printed if the user sets the environment variable GIT_PRINT_SHA1_ELLIPSIS to "yes". Correct documentation with respect to what describe_detached_head prints when GIT_PRINT_SHA1_ELLIPSIS is not set as indicated above. Add tests for the old and new behaviour. Signed-off-by: Ann T Ropea <bedhanger@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-06hashmap: adjust documentation to reflect realityJohannes Schindelin
The hashmap API is just complicated enough that even at least one long-time Git contributor has to look up how to use it every time he finds a new use case. When that happens, it is really useful if the provided example code is correct... While at it, "fix a memory leak", avoid statements before variable declarations, fix a const -> no-const cast, several %l specifiers (which want to be %ld), avoid using an undefined constant, call scanf() correctly, use FLEX_ALLOC_STR() where appropriate, and adjust the style here and there. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-05Documentation/git-clone: improve description for submodule recursingStefan Beller
There have been a few complaints on the mailing list that git-clone doesn't respect the `submodule.recurse` setting, which every other command (that potentially knows how to deal with submodules) respects. In case of clone this is not beneficial to respect as the user may not want to obtain all submodules (assuming a pathspec of '.'). Improve the documentation such that the pathspec is mentioned in the synopsis to alleviate the confusion around the submodule recursion flag in git-clone. While at it clarify that the option can be given multiple times for complex pathspecs. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-05pathspec: only match across submodule boundaries when requestedBrandon Williams
Commit 74ed43711fd (grep: enable recurse-submodules to work on <tree> objects, 2016-12-16) taught 'tree_entry_interesting()' to be able to match across submodule boundaries in the presence of wildcards. This is done by performing literal matching up to the first wildcard and then punting to the submodule itself to perform more accurate pattern matching. Instead of introducing a new flag to request this behavior, commit 74ed43711fd overloaded the already existing 'recursive' flag in 'struct pathspec' to request this behavior. This leads to a bug where whenever any other caller has the 'recursive' flag set as well as a pathspec with wildcards that all submodules will be indicated as matches. One simple example of this is: git init repo cd repo git init submodule git -C submodule commit -m initial --allow-empty touch "[bracket]" git add "[bracket]" git commit -m bracket git add submodule git commit -m submodule git rev-list HEAD -- "[bracket]" Fix this by introducing the new flag 'recurse_submodules' in 'struct pathspec' and using this flag to determine if matches should be allowed to cross submodule boundaries. This fixes https://github.com/git-for-windows/git/issues/1371. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-05Merge branch 'ls/no-double-utf8-author-name' of ../git-gui into ↵Junio C Hamano
ls/git-gui-no-double-utf8-author-name * 'ls/no-double-utf8-author-name' of ../git-gui: git-gui: prevent double UTF-8 conversion
2017-12-05git-gui: prevent double UTF-8 conversionŁukasz Stelmach
Convert author's name and e-mail address from the UTF-8 (or any other) encoding in load_last_commit function the same way commit message is converted. Amending commits in git-gui without such conversion breaks UTF-8 strings. For example, "\305\201ukasz" (as written by git cat-file) becomes "\303\205\302\201ukasz" in an amended commit. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-05strbuf: remove unused stripspace function aliasElijah Newren
In commit 63af4a8446 ("strbuf: make stripspace() part of strbuf", 2015-10-16), stripspace() was moved to strbuf and renamed to strbuf_stripspace(). A "temporary" alias was added for the old name until all topic branches had time to switch over. They have had time, so remove the old alias. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-05progress: drop delay-threshold codeLars Schneider
Since 180a9f2268 (provide a facility for "delayed" progress reporting, 2007-04-20), the progress code has allowed callers to skip showing progress if they have reached a percentage-threshold of the total work before the delay period passes. But since 8aade107dd (progress: simplify "delayed" progress API, 2017-08-19), that parameter is not available to outside callers (we always passed zero after that commit, though that was corrected in the previous commit to "100%"). Let's drop the threshold code, which never triggers in any meaningful way. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-05progress: set default delay threshold to 100%, not 0%Jeff King
Commit 8aade107dd (progress: simplify "delayed" progress API, 2017-08-19) dropped the parameter by which callers could say "show my progress only if I haven't passed M% progress after N seconds". The intent was to just show nothing for 2 seconds, and then always progress after that. But we flipped the logic in the wrapper: it sets M=0, meaning that we'd almost _never_ show progress after 2 seconds, since we'd generally have made some progress. This should have been 100%, not 0%. We were fooled by existing calls like: start_progress_delay("foo", 0, 0, 2); which behaved this way. The trick is that the first "0" there is "how many items total", and there zero means "we don't know". And without knowing that, we cannot compute a completed percent at all, and we ignored the threshold parameter entirely! Modeling our wrapper after that broke callers which pass a non-zero value for "total". We can switch to the intended behavior by using "100" in the wrapper call. Reported-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-04sha1_file: use strbuf_add() instead of strbuf_addf()Derrick Stolee
Replace use of strbuf_addf() with strbuf_add() when enumerating loose objects in for_each_file_in_obj_subdir(). Since we already check the length and hex-values of the string before consuming the path, we can prevent extra computation by using the lower- level method. One consumer of for_each_file_in_obj_subdir() is the abbreviation code. OID abbreviations use a cached list of loose objects (per object subdirectory) to make repeated queries fast, but there is significant cache load time when there are many loose objects. Most repositories do not have many loose objects before repacking, but in the GVFS case the repos can grow to have millions of loose objects. Profiling 'git log' performance in GitForWindows on a GVFS-enabled repo with ~2.5 million loose objects revealed 12% of the CPU time was spent in strbuf_addf(). Add a new performance test to p4211-line-log.sh that is more sensitive to this cache-loading. By limiting to 1000 commits, we more closely resemble user wait time when reading history into a pager. For a copy of the Linux repo with two ~512 MB packfiles and ~572K loose objects, running 'git log --oneline --parents --raw -1000' had the following performance: HEAD~1 HEAD ---------------------------------------- 7.70(7.15+0.54) 7.44(7.09+0.29) -3.4% Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-04refactor "dumb" terminal determinationLars Schneider
Move the code to detect "dumb" terminals into a single location. This avoids duplicating the terminal detection code yet again in a subsequent commit. Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-04print_sha1_ellipsis: introduce helperAnn T Ropea
Introduce a helper print_sha1_ellipsis() that pays attention to the GIT_PRINT_SHA1_ELLIPSIS environment variable, and prepare the tests to unconditionally set it for the test pieces that will be broken once the code stops showing the extra dots by default. The removal of these dots is merely a plan at this step and has not happened yet but soon will. Document GIT_PRINT_SHA1_ELLIPSIS. Signed-off-by: Ann T Ropea <bedhanger@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-04Documentation: user-manual: limit usage of ellipsisAnn T Ropea
There is no need to use full 40-hex to identify the object names like the examples hint at by omitting the tail part of an object name as if that has to be spelled out but the example omits them only for brevity. Give examples using abbreviated object names without ellipses just like how people do in real life. Signed-off-by: Ann T Ropea <bedhanger@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-04Documentation: revisions: fix typo: "three dot" ---> "three-dot" (in line ↵Ann T Ropea
with "two-dot"). Signed-off-by: Ann T Ropea <bedhanger@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-03diffcore-rename: make diff-tree -l0 mean -l<large>Jonathan Tan
In the documentation of diff-tree, it is stated that the -l option "prevents rename/copy detection from running if the number of rename/copy targets exceeds the specified number". The documentation does not mention any special handling for the number 0, but the implementation before commit 9f7e4bfa3b ("diff: remove silent clamp of renameLimit", 2017-11-13) treated 0 as a special value indicating that the rename limit is to be a very large number instead. The commit 9f7e4bfa3b changed that behavior, treating 0 as 0. Revert this behavior to what it was previously. This allows existing scripts and tools that use "-l0" to continue working. The alternative (to have "-l0" suppress rename detection) is probably much less useful, since users can just refrain from specifying -M and/or -C to have the same effect. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-28Sync with v2.15.1Junio C Hamano
2017-11-28RelNotes: the seventh batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-28Merge branch 'rs/include-comments-before-the-function-header'Junio C Hamano
"git grep -W", "git diff -W" and their friends learned a heuristic to extend a pre-context beyond the line that matches the "function pattern" (aka "diff.*.xfuncname") to include a comment block, if exists, that immediately precedes it. * rs/include-comments-before-the-function-header: grep: show non-empty lines before functions with -W grep: update boundary variable for pre-context t7810: improve check of -W with user-defined function lines xdiff: show non-empty lines before functions with -W xdiff: factor out is_func_rec() t4051: add test for comments preceding function lines
2017-11-28Merge branch 'ma/branch-list-paginate'Junio C Hamano
"git branch --list" learned to show its output through the pager by default when the output is going to a terminal, which is controlled by the pager.branch configuration variable. This is similar to a recent change to "git tag --list". * ma/branch-list-paginate: branch: change default of `pager.branch` to "on" branch: respect `pager.branch` in list-mode only t7006: add tests for how git branch paginates
2017-11-28Merge branch 'jc/branch-name-sanity'Junio C Hamano
"git branch" and "git checkout -b" are now forbidden from creating a branch whose name is "HEAD". * jc/branch-name-sanity: builtin/branch: remove redundant check for HEAD branch: correctly reject refs/heads/{-dash,HEAD} branch: split validate_new_branchname() into two branch: streamline "attr_only" handling in validate_new_branchname()
2017-11-28Git 2.15.1v2.15.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-28Merge branch 'rs/config-write-section-fix' into maintJunio C Hamano
There was a recent semantic mismerge in the codepath to write out a section of a configuration section, which has been corrected. * rs/config-write-section-fix: config: flip return value of write_section()
2017-11-28repository: fix a sparse 'using integer as NULL pointer' warningRamsay Jones
Commit 78a6766802 ("Integrate hash algorithm support with repo setup", 2017-11-12) added a 'const struct git_hash_algo *hash_algo' field to the repository structure, without modifying the initializer of the 'the_repo' variable. This does not actually introduce a bug, since the '0' initializer for the 'ignore_env:1' bit-field is interpreted as a NULL pointer (hence the warning), and the final field (now with no initializer) receives a default '0'. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-28Doc/checkout: checking out using @{-N} can lead to detached stateKaartic Sivaraam
@{-N} is a syntax for the N-th last "checkout" and not the N-th last "branch". Therefore, in some cases using `git checkout @{-$N}` DOES lead to a "detached HEAD" state. This can also be ensured by the commit message of 75d6e552a (Documentation: @{-N} can refer to a commit, 2014-01-19) which clearly specifies how @{-N} can be used to refer not only to a branch but also to a commit. Correct the misleading sentence which states that @{-N} doesn't detach HEAD. Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-28diff: support anchoring line(s)Jonathan Tan
Teach diff a new algorithm, one that attempts to prevent user-specified lines from appearing as a deletion or addition in the end result. The end user can use this by specifying "--anchored=<text>" one or more times when using Git commands like "diff" and "show". Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-28git-send-email: honor $PATH for sendmail binaryFlorian Klink
This extends git-send-email to also consider sendmail binaries in $PATH after checking the (fixed) list of /usr/sbin and /usr/lib, and before falling back to localhost. Signed-off-by: Florian Klink <flokli@flokli.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-27git-status.txt: mention --no-optional-locksJeff King
If you come to the documentation thinking "I do not want Git to take any locks for my background processes", then you may easily run across "--no-optional-locks" in git.txt. But it's quite reasonable to hit a specific instance of the problem: you have "git status" running in the background, and you notice that it causes lock contention with other processes. So you look in git-status.txt to see if there is a way to disable it, but there's no mention of the flag. Let's add a short note mentioning that status does indeed touch the index (and why), with a pointer to the global option. That can point users in the right direction and help them make a more informed decision about what they're disabling. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-27RelNotes: the sixth batch for 2.16Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-27Sync with maintJunio C Hamano
* maint: A bit more fixes for 2.15.1 RelNotes: minor typo fixes in 2.15.1 draft
2017-11-27Merge branch 'sw/pull-ipv46-passthru'Junio C Hamano
Contrary to the documentation, "git pull -4/-6 other-args" did not ask the underlying "git fetch" to go over IPv4/IPv6, which has been corrected. * sw/pull-ipv46-passthru: pull: pass -4/-6 option to 'git fetch'
2017-11-27Merge branch 'ks/rebase-no-git-foo'Junio C Hamano
Mentions of "git-rebase" and "git-am" (dashed form) still remained in end-user visible strings emitted by the "git rebase" command; they have been corrected. * ks/rebase-no-git-foo: git-rebase: clean up dashed-usages in messages