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
2016-02-12list-objects: drop name_path entirelyJeff King
In the previous commit, we left name_path as a thin wrapper around a strbuf. This patch drops it entirely. As a result, every show_object_fn callback needs to be adjusted. However, none of their code needs to be changed at all, because the only use was to pass it to path_name(), which now handles the bare strbuf. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-12list-objects: convert name_path to a strbufJeff King
The "struct name_path" data is examined in only two places: we generate it in process_tree(), and we convert it to a single string in path_name(). Everyone else just passes it through to those functions. We can further note that process_tree() already keeps a single strbuf with the leading tree path, for use with tree_entry_interesting(). Instead of building a separate name_path linked list, let's just use the one we already build in "base". This reduces the amount of code (especially tricky code in path_name() which did not check for integer overflows caused by deep or large pathnames). It is also more efficient in some instances. Any time we were using tree_entry_interesting, we were building up the strbuf anyway, so this is an immediate and obvious win there. In cases where we were not, we trade off storing "pathname/" in a strbuf on the heap for each level of the path, instead of two pointers and an int on the stack (with one pointer into the tree object). On a 64-bit system, the latter is 20 bytes; so if path components are less than that on average, this has lower peak memory usage. In practice it probably doesn't matter either way; we are already holding in memory all of the tree objects leading up to each pathname, and for normal-depth pathnames, we are only talking about hundreds of bytes. This patch leaves "struct name_path" as a thin wrapper around the strbuf, to avoid disrupting callbacks. We should fix them, but leaving it out makes this diff easier to view. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-12show_object_with_name: simplify by using path_name()Jeff King
When "git rev-list" shows an object with its associated path name, it does so by walking the name_path linked list and printing each component (stopping at any embedded NULs or newlines). We'd like to eventually get rid of name_path entirely in favor of a single buffer, and dropping this custom printing code is part of that. As a first step, let's use path_name() to format the list into a single buffer, and print that. This is strictly less efficient than the original, but it's a temporary step in the refactoring; our end game will be to get the fully formatted name in the first place. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-12http-push: stop using name_pathJeff King
The graph traversal code here passes along a name_path to build up the pathname at which we find each blob. But we never actually do anything with the resulting names, making it a waste of code and memory. This usage came in aa1dbc9 (Update http-push functionality, 2006-03-07), and originally the result was passed to "add_object" (which stored it, but didn't really use it, either). But we stopped using that function in 1f1e895 (Add "named object array" concept, 2006-06-19) in favor of storing just the objects themselves. Moreover, the generation of the name in process_tree() is buggy. It sticks "name" onto the end of the name_path linked list, and then passes it down again as it recurses (instead of "entry.path"). So it's a good thing this was unused, as the resulting path for "a/b/c/d" would end up as "a/a/a/a". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-11Sixth batch for the 2.8 cycleJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-11Merge branch 'js/test-lib-windows-emulated-yes'Junio C Hamano
The emulated "yes" command used in our test scripts has been tweaked not to spend too much time generating unnecessary output that is not used, to help those who test on Windows where it would not stop until it fills the pipe buffer due to lack of SIGPIPE. * js/test-lib-windows-emulated-yes: test-lib: limit the output of the yes utility
2016-02-11Merge branch 'wp/sha1-name-negative-match'Junio C Hamano
A new "<branch>^{/!-<pattern>}" notation can be used to name a commit that is reachable from <branch> that does not match the given <pattern>. * wp/sha1-name-negative-match: object name: introduce '^{/!-<negative pattern>}' notation test for '!' handling in rev-parse's named commits
2016-02-11Merge branch 'jk/options-cleanup'Junio C Hamano
Various clean-ups to the command line option parsing. * jk/options-cleanup: apply, ls-files: simplify "-z" parsing checkout-index: disallow "--no-stage" option checkout-index: handle "--no-index" option checkout-index: handle "--no-prefix" option checkout-index: simplify "-z" option parsing give "nbuf" strbuf a more meaningful name
2016-02-11Merge branch 'aw/push-force-with-lease-reporting'Junio C Hamano
"git push --force-with-lease" has been taught to report if the push needed to force (or fast-forwarded). * aw/push-force-with-lease-reporting: push: fix ref status reporting for --force-with-lease
2016-02-11Merge branch 'ls/clean-smudge-override-in-config'Junio C Hamano
Clean/smudge filters defined in a configuration file of lower precedence can now be overridden to be a pass-through no-op by setting the variable to an empty string. * ls/clean-smudge-override-in-config: convert: treat an empty string for clean/smudge filters as "cat"
2016-02-11Merge branch 'ew/connect-verbose'Junio C Hamano
There were a few "now I am doing this thing" progress messages in the TCP connection code that can be triggered by setting a verbose option internally in the code, but "git fetch -v" and friends never passed the verbose option down to that codepath. There was a brief discussion about the impact on the end-user experience by not limiting this to "fetch -v -v", but I think the conclusion is that this is OK to enable with a single "-v" as it is not too noisy. * ew/connect-verbose: pass transport verbosity down to git_connect
2016-02-11Merge branch 'cc/untracked'Junio C Hamano
Update the untracked cache subsystem and change its primary UI from "git update-index" to "git config". * cc/untracked: t7063: add tests for core.untrackedCache test-dump-untracked-cache: don't modify the untracked cache config: add core.untrackedCache dir: simplify untracked cache "ident" field dir: add remove_untracked_cache() dir: add {new,add}_untracked_cache() update-index: move 'uc' var declaration update-index: add untracked cache notifications update-index: add --test-untracked-cache update-index: use enum for untracked cache options dir: free untracked cache when removing it
2016-02-11Merge branch 'js/xmerge-marker-eol'Junio C Hamano
The low-level merge machinery has been taught to use CRLF line termination when inserting conflict markers to merged contents that are themselves CRLF line-terminated. * js/xmerge-marker-eol: merge-file: ensure that conflict sections match eol style merge-file: let conflict markers match end-of-line style of the context
2016-02-11Merge branch 'nd/do-not-move-worktree-manually'Junio C Hamano
"git worktree" had a broken code that attempted to auto-fix possible inconsistency that results from end-users moving a worktree to different places without telling Git (the original repository needs to maintain backpointers to its worktrees, but "mv" run by end-users who are not familiar with that fact will obviously not adjust them), which actually made things worse when triggered. * nd/do-not-move-worktree-manually: worktree: stop supporting moving worktrees manually worktree.c: fix indentation
2016-02-06Sync with 2.7.1Junio C Hamano
2016-02-06Git 2.7.1v2.7.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-06Merge branch 'lv/add-doc-working-tree' into maintJunio C Hamano
* lv/add-doc-working-tree: git-add doc: do not say working directory when you mean working tree
2016-02-06Merge branch 'ss/clone-depth-single-doc' into maintJunio C Hamano
Documentation for "git fetch --depth" has been updated for clarity. * ss/clone-depth-single-doc: docs: clarify that --depth for git-fetch works with newly initialized repos docs: say "commits" in the --depth option wording for git-clone docs: clarify that passing --depth to git-clone implies --single-branch
2016-02-06Merge branch 'sg/t6050-failing-editor-test-fix' into maintJunio C Hamano
* sg/t6050-failing-editor-test-fix: t6050-replace: make failing editor test more robust
2016-02-06Merge branch 'ew/for-each-ref-doc' into maintJunio C Hamano
* ew/for-each-ref-doc: for-each-ref: document `creatordate` and `creator` fields
2016-02-06Merge branch 'ss/user-manual' into maintJunio C Hamano
Drop a few old "todo" items by deciding that the change one of them suggests is not such a good idea, and doing the change the other one suggested to do. * ss/user-manual: user-manual: add addition gitweb information user-manual: add section documenting shallow clones glossary: define the term shallow clone user-manual: remove temporary branch entry from todo list
2016-02-06Merge branch 'jk/ref-cache-non-repository-optim' into maintJunio C Hamano
The underlying machinery used by "ls-files -o" and other commands have been taught not to create empty submodule ref cache for a directory that is not a submodule. This removes a ton of wasted CPU cycles. * jk/ref-cache-non-repository-optim: resolve_gitlink_ref: ignore non-repository paths clean: make is_git_repository a public function
2016-02-06Merge branch 'js/dirname-basename' into maintJunio C Hamano
dirname() emulation has been added, as Msys2 lacks it. * js/dirname-basename: mingw: avoid linking to the C library's isalpha() t0060: loosen overly strict expectations t0060: verify that basename() and dirname() work as expected compat/basename.c: provide a dirname() compatibility function compat/basename: make basename() conform to POSIX Refactor skipping DOS drive prefixes
2016-02-06Merge branch 'tb/complete-word-diff-regex' into maintJunio C Hamano
* tb/complete-word-diff-regex: completion: complete "diff --word-diff-regex="
2016-02-06Merge branch 'pw/completion-stash' into maintJunio C Hamano
* pw/completion-stash: completion: update completion arguments for stash
2016-02-06Merge branch 'pw/completion-show-branch' into maintJunio C Hamano
* pw/completion-show-branch: completion: complete show-branch "--date-order"
2016-02-06Merge branch 'jk/completion-rebase' into maintJunio C Hamano
* jk/completion-rebase: completion: add missing git-rebase options
2016-02-06Merge branch 'nd/diff-with-path-params' into maintJunio C Hamano
A few options of "git diff" did not work well when the command was run from a subdirectory. * nd/diff-with-path-params: diff: make -O and --output work in subdirectory diff-no-index: do not take a redundant prefix argument
2016-02-06Merge branch 'dw/subtree-split-do-not-drop-merge' into maintJunio C Hamano
The "split" subcommand of "git subtree" (in contrib/) incorrectly skipped merges when it shouldn't, which was corrected. * dw/subtree-split-do-not-drop-merge: contrib/subtree: fix "subtree split" skipped-merge bug
2016-02-06Merge branch 'ew/svn-1.9.0-auth' into maintJunio C Hamano
* ew/svn-1.9.0-auth: git-svn: fix auth parameter handling on SVN 1.9.0+
2016-02-06Merge branch 'jk/list-tag-2.7-regression' into maintJunio C Hamano
"git tag" started listing a tag "foo" as "tags/foo" when a branch named "foo" exists in the same repository; remove this unnecessary disambiguation, which is a regression introduced in v2.7.0. * jk/list-tag-2.7-regression: tag: do not show ambiguous tag names as "tags/foo" t6300: use test_atom for some un-modern tests
2016-02-06Merge branch 'jk/sanity' into maintJunio C Hamano
The description for SANITY prerequisite the test suite uses has been clarified both in the comment and in the implementation. * jk/sanity: test-lib: clarify and tighten SANITY
2016-02-06Merge branch 'jk/filter-branch-no-index' into maintJunio C Hamano
A recent optimization to filter-branch in v2.7.0 introduced a regression when --prune-empty filter is used, which has been corrected. * jk/filter-branch-no-index: filter-branch: resolve $commit^{tree} in no-index case
2016-02-06Merge branch 'js/close-packs-before-gc' into maintJunio C Hamano
Many codepaths that run "gc --auto" before exiting kept packfiles mapped and left the file descriptors to them open, which was not friendly to systems that cannot remove files that are open. They now close the packs before doing so. * js/close-packs-before-gc: receive-pack: release pack files before garbage-collecting merge: release pack files before garbage-collecting am: release pack files before garbage-collecting fetch: release pack files before garbage-collecting
2016-02-06Merge branch 'jk/ok-to-fail-gc-auto-in-rebase' into maintJunio C Hamano
"git rebase", unlike all other callers of "gc --auto", did not ignore the exit code from "gc --auto". * jk/ok-to-fail-gc-auto-in-rebase: rebase: ignore failures from "gc --auto"
2016-02-06Merge branch 'ho/gitweb-squelch-undef-warning' into maintJunio C Hamano
Asking gitweb for a nonexistent commit left a warning in the server log. Somebody may want to follow this up with a new test, perhaps? IIRC, we do test that no Perl warnings are given to the server log, so this should have been caught if our test coverage were good. * ho/gitweb-squelch-undef-warning: gitweb: squelch "uninitialized value" warning
2016-02-06Merge branch 'js/fopen-harder' into maintJunio C Hamano
Some codepaths used fopen(3) when opening a fixed path in $GIT_DIR (e.g. COMMIT_EDITMSG) that is meant to be left after the command is done. This however did not work well if the repository is set to be shared with core.sharedRepository and the umask of the previous user is tighter. They have been made to work better by calling unlink(2) and retrying after fopen(3) fails with EPERM. * js/fopen-harder: Handle more file writes correctly in shared repos commit: allow editing the commit message even in shared repos
2016-02-06Merge branch 'nd/exclusion-regression-fix' into maintJunio C Hamano
The ignore mechanism saw a few regressions around untracked file listing and sparse checkout selection areas in 2.7.0; the change that is responsible for the regression has been reverted. * nd/exclusion-regression-fix: Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"
2016-02-06Merge branch 'dk/reflog-walk-with-non-commit' into maintJunio C Hamano
"git reflog" incorrectly assumed that all objects that used to be at the tip of a ref must be commits, which caused it to segfault. * dk/reflog-walk-with-non-commit: reflog-walk: don't segfault on non-commit sha1's in the reflog
2016-02-06Merge branch 'dw/signoff-doc' into maintJunio C Hamano
The documentation has been updated to hint the connection between the '--signoff' option and DCO. * dw/signoff-doc: Expand documentation describing --signoff
2016-02-06Merge branch 'jk/clang-pedantic' into maintJunio C Hamano
A few unportable C construct have been spotted by clang compiler and have been fixed. * jk/clang-pedantic: bswap: add NO_UNALIGNED_LOADS define avoid shifting signed integers 31 bits
2016-02-06Merge branch 'ew/send-email-mutt-alias-fix' into maintJunio C Hamano
"git send-email" was confused by escaped quotes stored in the alias files saved by "mutt", which has been corrected. * ew/send-email-mutt-alias-fix: git-send-email: do not double-escape quotes from mutt
2016-02-06Merge branch 'nd/dir-exclude-cleanup' into maintJunio C Hamano
The "exclude_list" structure has the usual "alloc, nr" pair of fields to be used by ALLOC_GROW(), but clear_exclude_list() forgot to reset 'alloc' to 0 when it cleared 'nr' to discard the managed array. * nd/dir-exclude-cleanup: dir.c: clean the entire struct in clear_exclude_list()
2016-02-06Merge branch 'nd/stop-setenv-work-tree' into maintJunio C Hamano
An earlier change in 2.5.x-era broke users' hooks and aliases by exporting GIT_WORK_TREE to point at the root of the working tree, interfering when they tried to use a different working tree without setting GIT_WORK_TREE environment themselves. * nd/stop-setenv-work-tree: Revert "setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR"
2016-02-04Fifth batch for 2.8 cycleJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-04Merge branch 'kf/http-proxy-auth-methods'Junio C Hamano
New http.proxyAuthMethod configuration variable can be used to specify what authentication method to use, as a way to work around proxies that do not give error response expected by libcurl when CURLAUTH_ANY is used. Also, the codepath for proxy authentication has been taught to use credential API to store the authentication material in user's keyrings. * kf/http-proxy-auth-methods: http: use credential API to handle proxy authentication http: allow selection of proxy authentication method
2016-02-04Merge branch 'jk/ref-cache-non-repository-optim'Junio C Hamano
The underlying machinery used by "ls-files -o" and other commands have been taught not to create empty submodule ref cache for a directory that is not a submodule. This removes a ton of wasted CPU cycles. * jk/ref-cache-non-repository-optim: resolve_gitlink_ref: ignore non-repository paths clean: make is_git_repository a public function
2016-02-04Merge branch 'ls/travis-prove-order'Junio C Hamano
Automated tests in Travis CI environment has been optimized by persisting runtime statistics of previous "prove" run, executing tests that take longer before other ones; this reduces the total wallclock time. * ls/travis-prove-order: travis-ci: explicity use container-based infrastructure travis-ci: run previously failed tests first, then slowest to fastest
2016-02-04Merge branch 'dt/unpack-compare-entry-optim'Junio C Hamano
"git checkout $branch" (and other operations that share the same underlying machinery) has been optimized. * dt/unpack-compare-entry-optim: unpack-trees: fix accidentally quadratic behavior do_compare_entry: use already-computed path
2016-02-04Merge branch 'js/dirname-basename'Junio C Hamano
dirname() emulation has been added, as Msys2 lacks it. * js/dirname-basename: mingw: avoid linking to the C library's isalpha() t0060: loosen overly strict expectations t0060: verify that basename() and dirname() work as expected compat/basename.c: provide a dirname() compatibility function compat/basename: make basename() conform to POSIX Refactor skipping DOS drive prefixes