summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-01-31Merge branch 'vp/show-ref-verify-head'Libravatar Junio C Hamano2-28/+63
"git show-ref HEAD" used with "--verify" because the user is not interested in seeing refs/remotes/origin/HEAD, and used with "--head" because the user does not want HEAD to be filtered out, i.e. "git show-ref --head --verify HEAD", did not work as expected. * vp/show-ref-verify-head: show-ref: remove a stale comment show-ref: remove dead `if (verify)' check show-ref: detect dangling refs under --verify as well show-ref: move --quiet handling into show_one() show-ref: allow -d to work with --verify show-ref: accept HEAD with --verify
2017-01-31Merge branch 'sb/retire-convert-objects-from-contrib'Libravatar Junio C Hamano2-358/+0
Remove an ancient tool left in contrib/. * sb/retire-convert-objects-from-contrib: contrib: remove git-convert-objects
2017-01-31Merge branch 'sb/in-core-index-doc'Libravatar Junio C Hamano3-22/+32
Documentation and in-code comments updates. * sb/in-core-index-doc: documentation: retire unfinished documentation cache.h: document add_[file_]to_index cache.h: document remove_index_entry_at cache.h: document index_name_pos
2017-01-31Merge branch 'js/remote-rename-with-half-configured-remote'Libravatar Junio C Hamano5-12/+27
With anticipatory tweaking for remotes defined in ~/.gitconfig (e.g. "remote.origin.prune" set to true, even though there may or may not actually be "origin" remote defined in a particular Git repository), "git remote rename" and other commands misinterpreted and behaved as if such a non-existing remote actually existed. * js/remote-rename-with-half-configured-remote: remote rename: more carefully determine whether a remote is configured remote rename: demonstrate a bogus "remote exists" bug
2017-01-31Merge branch 'jk/clear-delta-base-cache-fix'Libravatar Junio C Hamano2-6/+7
A crashing bug introduced in v2.11 timeframe has been found (it is triggerable only in fast-import) and fixed. * jk/clear-delta-base-cache-fix: clear_delta_base_cache(): don't modify hashmap while iterating
2017-01-31Merge branch 'st/verify-tag'Libravatar Junio C Hamano10-24/+115
"git tag" and "git verify-tag" learned to put GPG verification status in their "--format=<placeholders>" output format. * st/verify-tag: t/t7004-tag: Add --format specifier tests t/t7030-verify-tag: Add --format specifier tests builtin/tag: add --format argument for tag -v builtin/verify-tag: add --format to verify-tag ref-filter: add function to print single ref_array_item gpg-interface, tag: add GPG_VERIFY_OMIT_STATUS flag
2017-01-31Merge branch 'js/mingw-isatty'Libravatar Junio C Hamano1-7/+4
An update to a topic that is already in 'master'. * js/mingw-isatty: mingw: follow-up to "replace isatty() hack"
2017-01-31Merge branch 'js/sequencer-i-countdown-3'Libravatar Junio C Hamano3-97/+1030
The sequencer machinery has been further enhanced so that a later set of patches can start using it to reimplement "rebase -i". * js/sequencer-i-countdown-3: (38 commits) sequencer (rebase -i): write out the final message sequencer (rebase -i): write the progress into files sequencer (rebase -i): show the progress sequencer (rebase -i): suggest --edit-todo upon unknown command sequencer (rebase -i): show only failed cherry-picks' output sequencer (rebase -i): show only failed `git commit`'s output sequencer: use run_command() directly sequencer: update reading author-script sequencer (rebase -i): differentiate between comments and 'noop' sequencer (rebase -i): implement the 'drop' command sequencer (rebase -i): allow rescheduling commands sequencer (rebase -i): respect strategy/strategy_opts settings sequencer (rebase -i): respect the rebase.autostash setting sequencer (rebase -i): run the post-rewrite hook, if needed sequencer (rebase -i): record interrupted commits in rewritten, too sequencer (rebase -i): copy commit notes at end sequencer (rebase -i): set the reflog message consistently sequencer (rebase -i): refactor setting the reflog message sequencer (rebase -i): allow fast-forwarding for edit/reword sequencer (rebase -i): implement the 'reword' command ...
2017-01-31Merge branch 'jk/coding-guidelines-update'Libravatar Junio C Hamano1-5/+32
Developer doc update. * jk/coding-guidelines-update: CodingGuidelines: clarify multi-line brace style
2017-01-31Merge branch 'jk/loose-object-fsck'Libravatar Junio C Hamano4-41/+284
"git fsck" inspects loose objects more carefully now. * jk/loose-object-fsck: fsck: detect trailing garbage in all object types fsck: parse loose object paths directly sha1_file: add read_loose_object() function t1450: test fsck of packed objects sha1_file: fix error message for alternate objects t1450: refactor loose-object removal
2017-01-31Merge branch 'js/exec-path-coverity-workaround'Libravatar Junio C Hamano1-6/+8
Code cleanup. * js/exec-path-coverity-workaround: git_exec_path: do not return the result of getenv() git_exec_path: avoid Coverity warning about unfree()d result
2017-01-31Merge branch 'bw/push-submodule-only'Libravatar Junio C Hamano6-19/+53
"git submodule push" learned "--recurse-submodules=only option to push submodules out without pushing the top-level superproject. * bw/push-submodule-only: push: add option to push only submodules submodules: add RECURSE_SUBMODULES_ONLY value transport: reformat flag #defines to be more readable
2017-01-31Merge branch 'jk/vreport-sanitize'Libravatar Junio C Hamano1-10/+7
An error message with an ASCII control character like '\r' in it can alter the message to hide its early part, which is problematic when a remote side gives such an error message that the local side will relay with a "remote: " prefix. * jk/vreport-sanitize: vreport: sanitize ASCII control chars Revert "vreportf: avoid intermediate buffer"
2017-01-23show-ref: remove a stale commentLibravatar Junio C Hamano1-4/+0
When cf0adba788 ("Store peeled refs in packed-refs file.", 2006-11-19) made the command to die with a message on error even when --quiet is passed, it left the comment to say it changed the semantics. But that kind of information belongs to the log message, not in-code comment. Besides, the behaviour after the change has been the established one for the past 10 years ;-) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23Seventh batch for 2.12Libravatar Junio C Hamano1-0/+15
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23Merge branch 'ws/request-pull-code-cleanup'Libravatar Junio C Hamano1-3/+0
Code clean-up. * ws/request-pull-code-cleanup: request-pull: drop old USAGE stuff
2017-01-23Merge branch 'rh/diff-orderfile-doc'Libravatar Junio C Hamano2-5/+36
Documentation fix. * rh/diff-orderfile-doc: diff: document the format of the -O (diff.orderFile) file diff: document behavior of relative diff.orderFile
2017-01-23Merge branch 'sb/cd-then-git-can-be-written-as-git-c'Libravatar Junio C Hamano1-4/+1
Test clean-up. * sb/cd-then-git-can-be-written-as-git-c: lib-submodule-update.sh: reduce use of subshell by using "git -C"
2017-01-23Merge branch 'ad/bisect-terms'Libravatar Junio C Hamano1-2/+2
Documentation fix. * ad/bisect-terms: Documentation/bisect: improve on (bad|new) and (good|bad)
2017-01-23Merge branch 'sg/fix-versioncmp-with-common-suffix'Libravatar Junio C Hamano4-58/+221
The prereleaseSuffix feature of version comparison that is used in "git tag -l" did not correctly when two or more prereleases for the same release were present (e.g. when 2.0, 2.0-beta1, and 2.0-beta2 are there and the code needs to compare 2.0-beta1 and 2.0-beta2). * sg/fix-versioncmp-with-common-suffix: versioncmp: generalize version sort suffix reordering versioncmp: factor out helper for suffix matching versioncmp: use earliest-longest contained suffix to determine sorting order versioncmp: cope with common part overlapping with prerelease suffix versioncmp: pass full tagnames to swap_prereleases() t7004-tag: add version sort tests to show prerelease reordering issues t7004-tag: use test_config helper t7004-tag: delete unnecessary tags with test_when_finished
2017-01-23Merge branch 'vn/diff-ihc-config'Libravatar Junio C Hamano4-1/+42
"git diff" learned diff.interHunkContext configuration variable that gives the default value for its --inter-hunk-context option. * vn/diff-ihc-config: diff: add interhunk context config option
2017-01-23Merge branch 'sb/submodule-init'Libravatar Junio C Hamano3-7/+25
Error message fix. * sb/submodule-init: submodule update --init: display correct path from submodule
2017-01-23Merge branch 'sb/submodule-embed-gitdir'Libravatar Junio C Hamano1-1/+2
Help-text fix. * sb/submodule-embed-gitdir: submodule absorbgitdirs: mention in docstring help
2017-01-23Merge branch 'sb/submodule-config-tests'Libravatar Junio C Hamano1-2/+23
Test updates. * sb/submodule-config-tests: t7411: test lookup of uninitialized submodules t7411: quote URLs
2017-01-23Merge branch 'jk/grep-e-could-be-extended-beyond-posix'Libravatar Junio C Hamano1-11/+15
Tighten a test to avoid mistaking an extended ERE regexp engine as a PRE regexp engine. * jk/grep-e-could-be-extended-beyond-posix: t7810: avoid assumption about invalid regex syntax
2017-01-23Merge branch 'bw/read-blob-data-does-not-modify-index-state'Libravatar Junio C Hamano2-2/+3
Code clean-up. * bw/read-blob-data-does-not-modify-index-state: index: improve constness for reading blob data
2017-01-23show-ref: remove dead `if (verify)' checkLibravatar Vladimir Panteleev1-3/+0
As show_ref() is only ever called on the path where --verify is not specified, `verify' can never possibly be true here. Signed-off-by: Vladimir Panteleev <git@thecybershadow.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23show-ref: detect dangling refs under --verify as wellLibravatar Vladimir Panteleev2-8/+30
Move detection of dangling refs into show_one(), so that they are detected when --verify is present as well as when it is absent. Signed-off-by: Vladimir Panteleev <git@thecybershadow.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23show-ref: move --quiet handling into show_one()Libravatar Vladimir Panteleev1-5/+4
Do the same with --quiet as was done with -d, to remove the need to perform this check at show_one()'s call site from the --verify branch. Signed-off-by: Vladimir Panteleev <git@thecybershadow.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23show-ref: allow -d to work with --verifyLibravatar Vladimir Panteleev2-11/+21
Move handling of -d into show_one(), so that it takes effect when --verify is present as well as when it is absent. This is useful when the user wishes to avoid the costly iteration of refs. Signed-off-by: Vladimir Panteleev <git@thecybershadow.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23show-ref: accept HEAD with --verifyLibravatar Vladimir Panteleev2-1/+12
Previously, when --verify was specified, show-ref would use a separate code path which did not handle HEAD and treated it as an invalid ref. Thus, "git show-ref --verify HEAD" (where "--verify" is used because the user is not interested in seeing refs/remotes/origin/HEAD) did not work as expected. Instead of insisting that the input begins with "refs/", allow "HEAD" as well in the codepath that handles "--verify", so that all valid full refnames including HEAD are passed to the same output machinery. Signed-off-by: Vladimir Panteleev <git@thecybershadow.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19contrib: remove git-convert-objectsLibravatar Stefan Beller2-358/+0
git-convert-objects, originally named git-convert-cache was used in early 2005 to convert ancient repositories where objects are named after the hash of their compressed contents to the current object naming sheme where they are named after the hash of their pre-compression contents. By now the need for conversion of the very early repositories is less relevant, we no longer need to keep it in contrib; remove it. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19remote rename: more carefully determine whether a remote is configuredLibravatar Johannes Schindelin5-13/+21
One of the really nice features of the ~/.gitconfig file is that users can override defaults by their own preferred settings for all of their repositories. One such default that some users like to override is whether the "origin" remote gets auto-pruned or not. The user would simply call git config --global remote.origin.prune true and from now on all "origin" remotes would be pruned automatically when fetching into the local repository. There is just one catch: now Git thinks that the "origin" remote is configured, even if the repository config has no [remote "origin"] section at all, as it does not realize that the "prune" setting was configured globally and that there really is no "origin" remote configured in this repository. That is a problem e.g. when renaming a remote to a new name, when Git may be fooled into thinking that there is already a remote of that new name. Let's fix this by paying more attention to *where* the remote settings came from: if they are configured in the local repository config, we must not overwrite them. If they were configured elsewhere, we cannot overwrite them to begin with, as we only write the repository config. There is only one caller of remote_is_configured() (in `git fetch`) that may want to take remotes into account even if they were configured outside the repository config; all other callers essentially try to prevent the Git command from overwriting settings in the repository config. To accommodate that fact, the remote_is_configured() function now requires a parameter that states whether the caller is interested in all remotes, or only in those that were configured in the repository config. Many thanks to Jeff King whose tireless review helped with settling for nothing less than the current strategy. This fixes https://github.com/git-for-windows/git/issues/888 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19remote rename: demonstrate a bogus "remote exists" bugLibravatar Johannes Schindelin1-0/+7
Some users like to set `remote.origin.prune = true` in their ~/.gitconfig so that all of their repositories use that default. However, our code is ill-prepared for this, mistaking that single entry to mean that there is already a remote of the name "origin", even if there is not. This patch adds a test case demonstrating this issue. Reported by Andrew Arnott. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19documentation: retire unfinished documentationLibravatar Stefan Beller1-21/+0
When looking for documentation for a specific function, you may be tempted to run git -C Documentation grep index_name_pos only to find the file technical/api-in-core-index.txt, which doesn't help for understanding the given function. It would be better to not find these functions in the documentation, such that people directly dive into the code instead. In the previous patches we have documented * index_name_pos() * remove_index_entry_at() * add_[file_]to_index() in cache.h We already have documentation for: * add_index_entry() * read_index() Which leaves us with a TODO for: * cache -> the_index macros * refresh_index() * discard_index() * ie_match_stat() and ie_modified(); how they are different and when to use which. * write_index() that was renamed to write_locked_index * cache_tree_invalidate_path() * cache_tree_update() Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19cache.h: document add_[file_]to_indexLibravatar Stefan Beller1-0/+10
Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19cache.h: document remove_index_entry_atLibravatar Stefan Beller2-1/+3
Do this by moving the existing documentation from read-cache.c to cache.h. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19cache.h: document index_name_posLibravatar Stefan Beller1-0/+19
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19clear_delta_base_cache(): don't modify hashmap while iteratingLibravatar Jeff King2-6/+7
On Thu, Jan 19, 2017 at 03:03:46PM +0100, Ulrich Spörlein wrote: > > I suspect the patch below may fix things for you. It works around it by > > walking over the lru list (either is fine, as they both contain all > > entries, and since we're clearing everything, we don't care about the > > order). > > Confirmed. With the patch applied, I can import the whole 55G in one go > without any crashes or aborts. Thanks much! Thanks. Here it is rolled up with a commit message. -- >8 -- Subject: clear_delta_base_cache(): don't modify hashmap while iterating Removing entries while iterating causes fast-import to access an already-freed `struct packed_git`, leading to various confusing errors. What happens is that clear_delta_base_cache() drops the whole contents of the cache by iterating over the hashmap, calling release_delta_base_cache() on each entry. That function removes the item from the hashmap. The hashmap code may then shrink the table, but the hashmap_iter struct retains an offset from the old table. As a result, the next call to hashmap_iter_next() may claim that the iteration is done, even though some items haven't been visited. The only caller of clear_delta_base_cache() is fast-import, which wants to clear the cache because it is discarding the packed_git struct for its temporary pack. So by failing to remove all of the entries, we still have references to the freed packed_git. To make things even more confusing, this doesn't seem to trigger with the test suite, because it depends on complexities like the size of the hash table, which entries got cleared, whether we try to access them before they're evicted from the cache, etc. So I've been able to identify the problem with large imports like freebsd's svn import, or a fast-export of linux.git. But nothing that would be reasonable to run as part of the normal test suite. We can fix this easily by iterating over the lru linked list instead of the hashmap. They both contain the same entries, and we can use the "safe" variant of the list iterator, which exists for exactly this case. Let's also add a warning to the hashmap API documentation to reduce the chances of getting bit by this again. Reported-by: Ulrich Spörlein <uqs@freebsd.org> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-18Sixth batch for 2.12Libravatar Junio C Hamano1-0/+64
2017-01-18Merge branch 'sb/remove-gitview'Libravatar Junio C Hamano4-1369/+9
Retire long unused/unmaintained gitview from the contrib/ area. * sb/remove-gitview: doc: git-gui browser does not default to HEAD doc: gitk: add the upstream repo location doc: gitk: remove gitview reference contrib: remove gitview
2017-01-18Merge branch 'js/asciidoctor-tweaks'Libravatar Junio C Hamano3-9/+18
Adjust documentation to help AsciiDoctor render better while not breaking the rendering done by AsciiDoc. * js/asciidoctor-tweaks: asciidoctor: fix user-manual to be built by `asciidoctor` giteveryday: unbreak rendering with AsciiDoctor
2017-01-18Merge branch 'sb/unpack-trees-cleanup'Libravatar Junio C Hamano1-23/+30
Code cleanup. * sb/unpack-trees-cleanup: unpack-trees: factor progress setup out of check_updates unpack-trees: remove unneeded continue unpack-trees: move checkout state into check_updates
2017-01-18Merge branch 'rh/mergetool-regression-fix'Libravatar Junio C Hamano4-119/+186
"git mergetool" without any pathspec on the command line that is run from a subdirectory became no-op in Git v2.11 by mistake, which has been fixed. * rh/mergetool-regression-fix: mergetool: fix running in subdir when rerere enabled mergetool: take the "-O" out of $orderfile t7610: add test case for rerere+mergetool+subdir bug t7610: spell 'git reset --hard' consistently t7610: don't assume the checked-out commit t7610: always work on a test-specific branch t7610: delete some now-unnecessary 'git reset --hard' lines t7610: run 'git reset --hard' after each test to clean up t7610: don't rely on state from previous test t7610: use test_when_finished for cleanup tasks t7610: move setup code to the 'setup' test case t7610: update branch names to match test number rev-parse doc: pass "--" to rev-parse in the --prefix example .mailmap: record canonical email for Richard Hansen
2017-01-18Merge branch 'bw/realpath-wo-chdir'Libravatar Junio C Hamano2-3/+7
The implementation of "real_path()" was to go there with chdir(2) and call getcwd(3), but this obviously wouldn't be usable in a threaded environment. Rewrite it to manually resolve relative paths including symbolic links in path components. * bw/realpath-wo-chdir: real_path: set errno when max number of symlinks is exceeded real_path: prevent redefinition of MAXSYMLINKS
2017-01-18Merge branch 'jk/execv-dashed-external'Libravatar Junio C Hamano3-21/+35
Typing ^C to pager, which usually does not kill it, killed Git and took the pager down as a collateral damage in certain process-tree structure. This has been fixed. * jk/execv-dashed-external: execv_dashed_external: wait for child on signal death execv_dashed_external: stop exiting with negative code execv_dashed_external: use child_process struct
2017-01-18Merge branch 'sp/cygwin-build-fixes'Libravatar Junio C Hamano1-2/+2
Build updates for Cygwin. * sp/cygwin-build-fixes: Makefile: put LIBS after LDFLAGS for imap-send Makefile: POSIX windres
2017-01-18Merge branch 'sb/pathspec-errors'Libravatar Junio C Hamano2-2/+69
Running "git add a/b" when "a" is a submodule correctly errored out, but without a meaningful error message. * sb/pathspec-errors: pathspec: give better message for submodule related pathspec error
2017-01-18Merge branch 'pb/test-must-fail-is-for-git'Libravatar Junio C Hamano10-26/+26
Test cleanup. * pb/test-must-fail-is-for-git: t9813: avoid using pipes don't use test_must_fail with grep
2017-01-18Merge branch 'bw/pathspec-cleanup'Libravatar Junio C Hamano7-357/+388
Code clean-up in the pathspec API. * bw/pathspec-cleanup: pathspec: rename prefix_pathspec to init_pathspec_item pathspec: small readability changes pathspec: create strip submodule slash helpers pathspec: create parse_element_magic helper pathspec: create parse_long_magic function pathspec: create parse_short_magic function pathspec: factor global magic into its own function pathspec: simpler logic to prefix original pathspec elements pathspec: always show mnemonic and name in unsupported_magic pathspec: remove unused variable from unsupported_magic pathspec: copy and free owned memory pathspec: remove the deprecated get_pathspec function ls-tree: convert show_recursive to use the pathspec struct interface dir: convert fill_directory to use the pathspec struct interface dir: remove struct path_simplify mv: remove use of deprecated 'get_pathspec()'