summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-11-01sequencer: use read_author_script()Libravatar Phillip Wood1-76/+21
Use the new function added in the last commit to read the author script, updating read_env_script() and read_author_ident(). We now have a single code path that reads the author script for am and all flavors of rebase. This changes the behavior of read_env_script() as previously it would set any environment variables that were in the author-script file. Now it is an error if the file contains other variables or any of GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE are missing. This is what am and the non interactive version of rebase have been doing for several years so hopefully it will not cause a problem for interactive rebase users. The advantage is that we are reusing existing code from am which uses sq_dequote() to properly dequote variables. This fixes potential problems with user edited scripts as read_env_script() which did not track quotes properly. This commit also removes the fallback code for checking for a broken author script after git is upgraded when a rebase is stopped. Now that the parsing uses sq_dequote() it will reliably return an error if the quoting is broken and the user will have to abort the rebase and restart. This isn't ideal but it's a corner case and the detection of the broken quoting could be confused by user edited author scripts. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-01add read_author_script() to libgitLibravatar Phillip Wood3-84/+110
Add read_author_script() to sequencer.c based on the implementation in builtin/am.c and update read_am_author_script() to use read_author_script(). The sequencer code that reads the author script will be updated in the next commit. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-01am: rename read_author_script()Libravatar Phillip Wood1-2/+2
Rename read_author_script() in preparation for adding a shared read_author_script() function to libgit. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-01am: improve author-script error reportingLibravatar Phillip Wood1-10/+39
If there are errors in a user edited author-script there was no indication of what was wrong. This commit adds some specific error messages depending on the problem. It also relaxes the requirement that the variables appear in a specific order in the file to match the behavior of 'rebase --interactive'. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-01am: don't die in read_author_script()Libravatar Phillip Wood1-1/+2
The caller is already prepared to handle errors returned from this function so there is no need for it to die if it cannot read the file. Suggested-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-16Fourth batch for 2.20Libravatar Junio C Hamano1-0/+50
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-16Merge branch 'sf/complete-stash-list'Libravatar Junio C Hamano1-0/+3
The completion script (in contrib/) learned to complete a handful of options "git stash list" command takes. * sf/complete-stash-list: git-completion.bash: add completion for stash list
2018-10-16Merge branch 'mw/doc-typofixes'Libravatar Junio C Hamano2-3/+2
Typofixes. * mw/doc-typofixes: docs: typo: s/isimilar/similar/ docs: graph: remove unnecessary `graph_update()' call docs: typo: s/go/to/
2018-10-16Merge branch 'js/mingw-wants-vista-or-above'Libravatar Junio C Hamano4-9/+20
The minimum version of Windows supported by Windows port fo Git is now set to Vista. * js/mingw-wants-vista-or-above: mingw: bump the minimum Windows version to Vista mingw: set _WIN32_WINNT explicitly for Git for Windows compat/poll: prepare for targeting Windows Vista
2018-10-16Merge branch 'rs/sequencer-oidset-insert-avoids-dups'Libravatar Junio C Hamano1-3/+1
Code clean-up. * rs/sequencer-oidset-insert-avoids-dups: sequencer: use return value of oidset_insert()
2018-10-16Merge branch 'jk/oideq-hasheq-cleanup'Libravatar Junio C Hamano4-7/+8
Code clean-up. * jk/oideq-hasheq-cleanup: more oideq/hasheq conversions
2018-10-16Merge branch 'ma/mailing-list-address-in-git-help'Libravatar Junio C Hamano1-1/+3
Doc update. * ma/mailing-list-address-in-git-help: git doc: direct bug reporters to mailing list archive
2018-10-16Merge branch 'nd/packobjectshook-doc-fix'Libravatar Junio C Hamano1-4/+4
Doc update. * nd/packobjectshook-doc-fix: config.txt: correct the note about uploadpack.packObjectsHook
2018-10-16Merge branch 'rt/rebase-typofix'Libravatar Junio C Hamano1-3/+3
Typofix. * rt/rebase-typofix: git-rebase.sh: fix typos in error messages
2018-10-16Merge branch 'ma/t1400-undebug-test'Libravatar Junio C Hamano1-1/+1
Test fix. * ma/t1400-undebug-test: t1400: drop debug `echo` to actually execute `test`
2018-10-16Merge branch 'ma/commit-graph-docs'Libravatar Junio C Hamano2-19/+20
Doc update. * ma/commit-graph-docs: Doc: refer to the "commit-graph file" with dash git-commit-graph.txt: refer to "*commit*-graph file" git-commit-graph.txt: typeset more in monospace git-commit-graph.txt: fix bullet lists
2018-10-16Merge branch 'dz/credential-doc-url-matching-rules'Libravatar Junio C Hamano1-0/+6
Doc update. * dz/credential-doc-url-matching-rules: doc: clarify gitcredentials path component matching
2018-10-16Merge branch 'en/status-multiple-renames-to-the-same-target-fix'Libravatar Junio C Hamano2-0/+24
The code in "git status" sometimes hit an assertion failure. This was caused by a structure that was reused without cleaning the data used for the first run, which has been corrected. * en/status-multiple-renames-to-the-same-target-fix: commit: fix erroneous BUG, 'multiple renames on the same target? how?'
2018-10-16Merge branch 'ds/reachable-final-cleanup'Libravatar Junio C Hamano1-5/+3
Code already in 'master' is further cleaned-up by this patch. * ds/reachable-final-cleanup: commit-reach: cleanups in can_all_from_reach...
2018-10-16Merge branch 'jk/check-everything-connected-is-long-gone'Libravatar Junio C Hamano1-1/+1
Comment fix. * jk/check-everything-connected-is-long-gone: receive-pack: update comment with check_everything_connected
2018-10-16Merge branch 'jn/gc-auto'Libravatar Junio C Hamano3-10/+32
"gc --auto" ended up calling exit(-1) upon error, which has been corrected to use exit(1). Also the error reporting behaviour when daemonized has been updated to exit with zero status when stopping due to a previously discovered error (which implies there is no point running gc to improve the situation); we used to exit with failure in such a case. * jn/gc-auto: gc: do not return error for prior errors in daemonized mode
2018-10-16Merge branch 'jn/gc-auto-prep'Libravatar Junio C Hamano2-23/+19
Code clean-up. * jn/gc-auto-prep: gc: exit with status 128 on failure gc: improve handling of errors reading gc.log
2018-10-16Merge branch 'md/test-cleanup'Libravatar Junio C Hamano39-399/+568
Various test scripts have been updated for style and also correct handling of exit status of various commands. * md/test-cleanup: tests: order arguments to git-rev-list properly t9109: don't swallow Git errors upstream of pipes tests: don't swallow Git errors upstream of pipes t/*: fix ordering of expected/observed arguments tests: standardize pipe placement Documentation: add shell guidelines t/README: reformat Do, Don't, Keep in mind lists
2018-10-16Merge branch 'fe/doc-updates'Libravatar Junio C Hamano3-5/+39
Doc updates. * fe/doc-updates: git-describe.1: clarify that "human readable" is also git-readable git-column.1: clarify initial description, provide examples git-archimport.1: specify what kind of Arch we're talking about
2018-10-16Merge branch 'jn/mailmap-update'Libravatar Junio C Hamano1-1/+1
The mailmap file update. * jn/mailmap-update: mailmap: consistently normalize brian m. carlson's name
2018-10-16Merge branch 'tg/t5551-with-curl-7.61.1'Libravatar Junio C Hamano1-34/+34
Test update. * tg/t5551-with-curl-7.61.1: t5551: compare sorted cookies files t5551: move setup code inside test_expect blocks
2018-10-16Merge branch 'en/merge-cleanup'Libravatar Junio C Hamano1-93/+51
Code clean-up. * en/merge-cleanup: merge-recursive: rename merge_file_1() and merge_content() merge-recursive: remove final remaining caller of merge_file_one() merge-recursive: avoid wrapper function when unnecessary and wasteful merge-recursive: set paths correctly when three-way merging content
2018-10-16Merge branch 'rj/header-check'Libravatar Junio C Hamano8-0/+32
Header files clean-up. * rj/header-check: delta-islands.h: add missing forward declarations (hdr-check) midx.h: add missing forward declarations (hdr-check) refs/refs-internal.h: add missing declarations (hdr-check) refs/packed-backend.h: add missing declaration (hdr-check) refs/ref-cache.h: add missing declarations (hdr-check) ewah/ewok_rlw.h: add missing include (hdr-check) json-writer.h: add missing include (hdr-check) Makefile: add a hdr-check target
2018-10-16Merge branch 'ma/config-doc-update'Libravatar Junio C Hamano3-6/+6
Doc update. * ma/config-doc-update: git-config.txt: fix 'see: above' note Doc: use `--type=bool` instead of `--bool`
2018-10-16Merge branch 'jk/delta-islands-with-bitmap-reuse-delta-fix'Libravatar Junio C Hamano1-16/+52
Fix interactions between two recent topics. * jk/delta-islands-with-bitmap-reuse-delta-fix: pack-objects: handle island check for "external" delta base
2018-10-16Merge branch 'tq/refs-internal-comment-fix'Libravatar Junio C Hamano1-1/+1
Fix for typo in a sample code in comment. * tq/refs-internal-comment-fix: refs: docstring typo
2018-10-16Merge branch 'ts/alias-of-alias'Libravatar Junio C Hamano2-3/+65
An alias that expands to another alias has so far been forbidden, but now it is allowed to create such an alias. * ts/alias-of-alias: t0014: introduce an alias testing suite alias: show the call history when an alias is looping alias: add support for aliases of an alias
2018-10-16Merge branch 'ds/commit-graph-with-grafts'Libravatar Junio C Hamano16-30/+194
The recently introduced commit-graph auxiliary data is incompatible with mechanisms such as replace & grafts that "breaks" immutable nature of the object reference relationship. Disable optimizations based on its use (and updating existing commit-graph) when these incompatible features are in use in the repository. * ds/commit-graph-with-grafts: commit-graph: close_commit_graph before shallow walk commit-graph: not compatible with uninitialized repo commit-graph: not compatible with grafts commit-graph: not compatible with replace objects test-repository: properly init repo commit-graph: update design document refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback refs.c: migrate internal ref iteration to pass thru repository argument
2018-10-16Merge branch 'ab/commit-graph-progress'Libravatar Junio C Hamano6-14/+87
Generation of (experimental) commit-graph files have so far been fairly silent, even though it takes noticeable amount of time in a meaningfully large repository. The users will now see progress output. * ab/commit-graph-progress: gc: fix regression in 7b0f229222 impacting --quiet commit-graph verify: add progress output commit-graph write: add progress output
2018-10-10Third batch for 2.20Libravatar Junio C Hamano1-0/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-10Merge branch 'ab/fsck-skiplist'Libravatar Junio C Hamano6-45/+171
Update fsck.skipList implementation and documentation. * ab/fsck-skiplist: fsck: support comments & empty lines in skipList fsck: use oidset instead of oid_array for skipList fsck: use strbuf_getline() to read skiplist file fsck: add a performance test for skipList fsck: add a performance test fsck: document that skipList input must be unabbreviated fsck: document and test commented & empty line skipList input fsck: document and test sorted skipList input fsck tests: add a test for no skipList input fsck tests: setup of bogus commit object
2018-10-10Merge branch 'ds/multi-pack-verify'Libravatar Junio C Hamano6-20/+262
"git multi-pack-index" learned to detect corruption in the .midx file it uses, and this feature has been integrated into "git fsck". * ds/multi-pack-verify: fsck: verify multi-pack-index multi-pack-index: report progress during 'verify' multi-pack-index: verify object offsets multi-pack-index: fix 32-bit vs 64-bit size check multi-pack-index: verify oid lookup order multi-pack-index: verify oid fanout order multi-pack-index: verify missing pack multi-pack-index: verify packname order multi-pack-index: verify corrupt chunk lookup table multi-pack-index: verify bad header multi-pack-index: add 'verify' verb
2018-10-10Merge branch 'bc/hash-independent-tests'Libravatar Junio C Hamano14-113/+350
Various tests have been updated to make it easier to swap the hash function used for object identification. * bc/hash-independent-tests: t5318: use test_oid for HASH_LEN t1407: make hash size independent t1406: make hash-size independent t1405: make hash size independent t1400: switch hard-coded object ID to variable t1006: make hash size independent t0064: make hash size independent t0002: abstract away SHA-1 specific constants t0000: update tests for SHA-256 t0000: use hash translation table t: add test functions to translate hash-related values
2018-10-10Merge branch 'nd/test-tool'Libravatar Junio C Hamano13-114/+128
Test helper binaries clean-up. * nd/test-tool: Makefile: add a hint about TEST_BUILTINS_OBJS t/helper: merge test-dump-fsmonitor into test-tool t/helper: merge test-parse-options into test-tool t/helper: merge test-pkt-line into test-tool t/helper: merge test-dump-untracked-cache into test-tool t/helper: keep test-tool command list sorted
2018-10-10Merge branch 'nd/config-split'Libravatar Junio C Hamano10-702/+711
Split Documentation/config.txt for easier maintenance. * nd/config-split: config.txt: move submodule part out to a separate file config.txt: move sequence.editor out of "core" part config.txt: move sendemail part out to a separate file config.txt: move receive part out to a separate file config.txt: move push part out to a separate file config.txt: move pull part out to a separate file config.txt: move gui part out to a separate file config.txt: move gitcvs part out to a separate file config.txt: move format part out to a separate file config.txt: move fetch part out to a separate file config.txt: follow camelCase naming
2018-10-10Declare that the next one will be named 2.20Libravatar Junio C Hamano2-167/+168
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-07docs: typo: s/isimilar/similar/Libravatar Michael Witten1-1/+1
Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-07docs: graph: remove unnecessary `graph_update()' callLibravatar Michael Witten1-1/+0
The sample code calls `get_revision()' followed by `graph_update()', but the documentation and source code indicate that `get_revision()' already calls `graph_update()' for you. Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-07docs: typo: s/go/to/Libravatar Michael Witten1-1/+1
Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-07git-completion.bash: add completion for stash listLibravatar Steven Fernandez1-0/+3
Since stash list accepts git-log options, add the following useful options that make sense in the context of the `git stash list` command: --name-status --oneline --patch-with-stat Signed-off-by: Steven Fernandez <steve@lonetwin.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-07tests: order arguments to git-rev-list properlyLibravatar Matthew DeVore3-29/+44
It is a common mistake to put positional arguments before flags when invoking git-rev-list. Order the positional arguments last. This patch skips git-rev-list invocations which include the --not flag, since the ordering of flags and positional arguments affects the behavior. This patch also skips invocations of git-rev-list that occur in command substitution in which the exit code is discarded, since fixing those properly will require a more involved cleanup. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-07t9109: don't swallow Git errors upstream of pipesLibravatar Matthew DeVore1-13/+21
'git ... | foo' will mask any errors or crashes in git, so split up such pipes in this file. One testcase uses several separate pipe sequences in a row which are awkward to split up. Wrap the split-up pipe in a function so the awkwardness is not repeated. Also change that testcase's surrounding quotes from double to single to avoid premature string interpolation. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-07tests: don't swallow Git errors upstream of pipesLibravatar Matthew DeVore3-132/+141
Some pipes in tests lose the exit code of git processes, which can mask unexpected behavior like crashes. Split these pipes up so that git commands are only at the end of pipes rather than the beginning or middle. The violations fixed in this patch were found in the process of fixing pipe placement in a prior patch. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-07t/*: fix ordering of expected/observed argumentsLibravatar Matthew DeVore32-112/+112
Fix various places where the ordering was obviously wrong, meaning it was easy to find with grep. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-07tests: standardize pipe placementLibravatar Matthew DeVore7-250/+344
Instead of using a line-continuation and pipe on the second line, take advantage of the shell's implicit line continuation after a pipe character. So for example, instead of some long line \ | next line use some long line | next line And add a blank line before and after the pipe where it aids readability (it usually does). This better matches the coding style documented in Documentation/CodingGuidelines and used in shell scripts elsewhere in the tree. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>