summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-21tests: use 'test_must_be_empty' instead of 'test ! -s'SZEDER Gábor
Using 'test_must_be_empty' is preferable to 'test ! -s', because it gives a helpful error message if the given file is unexpectedly no empty, while the latter remains completely silent. Furthermore, it also catches cases when the given file unexpectedly does not exist at all. This patch was created by: sed -i -e 's/test ! -s/test_must_be_empty/' t[0-9]*.sh Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21tests: use 'test_must_be_empty' instead of '! test -s'SZEDER Gábor
Using 'test_must_be_empty' is preferable to '! test -s', because it gives a helpful error message if the given file is unexpectedly not empty, while the latter remains completely silent. Furthermore, it also catches cases when the given file unexpectedly does not exist at all. This patch was basically created by: sed -i -e 's/! test -s/test_must_be_empty/' t[0-9]*.sh with the following notable exceptions: - The '! test -s' check in '.gitmodules ignore=dirty suppresses submodules with untracked content' in 't7508-status.sh' is left as-is, because it's bogus and, therefore, it's subject of a dedicated patch. - The '! test -s' checks in 't9131-git-svn-empty-symlink.sh' and 't9135-git-svn-moved-branch-empty-file.sh' are immediately preceeded by a 'test -f' to ensure that the files exist in the first place. 'test_must_be_empty' ensures that as well, so those 'test -f' commands are removed as well. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-30tests: make use of the test_must_be_empty functionÆvar Arnfjörð Bjarmason
Change various tests that use an idiom of the form: >expect && test_cmp expect actual To instead use: test_must_be_empty actual The test_must_be_empty() wrapper was introduced in ca8d148daf ("test: test_must_be_empty helper", 2013-06-09). Many of these tests have been added after that time. This was mostly found with, and manually pruned from: git grep '^\s+>.*expect.* &&$' t Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-24Fourth batch for 2.19 cycleJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-24Merge branch 'as/sequencer-customizable-comment-char'Junio C Hamano
Honor core.commentchar when preparing the list of commits to replay in "rebase -i". * as/sequencer-customizable-comment-char: sequencer: use configured comment character
2018-07-24Merge branch 'sb/blame-color'Junio C Hamano
Code clean-up. * sb/blame-color: blame: prefer xsnprintf to strcpy for colors
2018-07-24Merge branch 'nd/command-list'Junio C Hamano
Build doc update for Windows. * nd/command-list: vcbuild/README: update to accommodate for missing common-cmds.h
2018-07-24Merge branch 'es/test-lint-one-shot-export'Junio C Hamano
Look for broken use of "VAR=VAL shell_func" in test scripts as part of test-lint. * es/test-lint-one-shot-export: t/check-non-portable-shell: detect "FOO=bar shell_func" t/check-non-portable-shell: make error messages more compact t/check-non-portable-shell: stop being so polite t6046/t9833: fix use of "VAR=VAL cmd" with a shell function
2018-07-24Merge branch 'wc/find-commit-with-pattern-on-detached-head'Junio C Hamano
"git rev-parse ':/substring'" did not consider the history leading only to HEAD when looking for a commit with the given substring, when the HEAD is detached. This has been fixed. * wc/find-commit-with-pattern-on-detached-head: sha1-name.c: for ":/", find detached HEAD commits
2018-07-24Merge branch 'jc/t3404-one-shot-export-fix'Junio C Hamano
Correct a broken use of "VAR=VAL shell_func" in a test. * jc/t3404-one-shot-export-fix: t3404: fix use of "VAR=VAL cmd" with a shell function
2018-07-24Merge branch 'mk/merge-in-sparse-checkout'Junio C Hamano
"git reset --merge" (hence "git merge ---abort") and "git reset --hard" had trouble working correctly in a sparsely checked out working tree after a conflict, which has been corrected. * mk/merge-in-sparse-checkout: unpack-trees: do not fail reset because of unmerged skipped entry
2018-07-24Merge branch 'hs/push-cert-check-cleanup'Junio C Hamano
Code clean-up. * hs/push-cert-check-cleanup: gpg-interface: make parse_gpg_output static and remove from interface header builtin/receive-pack: use check_signature from gpg-interface
2018-07-24Merge branch 'jk/empty-pick-fix'Junio C Hamano
Handling of an empty range by "git cherry-pick" was inconsistent depending on how the range ended up to be empty, which has been corrected. * jk/empty-pick-fix: sequencer: don't say BUG on bogus input sequencer: handle empty-set cases consistently
2018-07-24Merge branch 'bp/log-ref-write-fd-with-strbuf'Junio C Hamano
Code clean-up. * bp/log-ref-write-fd-with-strbuf: convert log_ref_write_fd() to use strbuf
2018-07-24Merge branch 'jt/partial-clone-fsck-connectivity'Junio C Hamano
Partial clone support of "git clone" has been updated to correctly validate the objects it receives from the other side. The server side has been corrected to send objects that are directly requested, even if they may match the filtering criteria (e.g. when doing a "lazy blob" partial clone). * jt/partial-clone-fsck-connectivity: clone: check connectivity even if clone is partial upload-pack: send refs' objects despite "filter"
2018-07-24Merge branch 'bc/send-email-auto-cte'Junio C Hamano
The content-transfer-encoding of the message "git send-email" sends out by default was 8bit, which can cause trouble when there is an overlong line to bust RFC 5322/2822 limit. A new option 'auto' to automatically switch to quoted-printable when there is such a line in the payload has been introduced and is made the default. * bc/send-email-auto-cte: docs: correct RFC specifying email line length send-email: automatically determine transfer-encoding send-email: accept long lines with suitable transfer encoding send-email: add an auto option for transfer encoding
2018-07-24Merge branch 'bb/unicode-11-width'Junio C Hamano
The character display width table has been updated to match the latest Unicode standard. * bb/unicode-11-width: unicode: update the width tables to Unicode 11
2018-07-24Merge branch 'bb/pedantic'Junio C Hamano
The codebase has been updated to compile cleanly with -pedantic option. * bb/pedantic: utf8.c: avoid char overflow string-list.c: avoid conversion from void * to function pointer sequencer.c: avoid empty statements at top level convert.c: replace "\e" escapes with "\033". fixup! refs/refs-internal.h: avoid forward declaration of an enum refs/refs-internal.h: avoid forward declaration of an enum fixup! connect.h: avoid forward declaration of an enum connect.h: avoid forward declaration of an enum
2018-07-24Merge branch 'tb/config-default'Junio C Hamano
Compilation fix. * tb/config-default: builtin/config: work around an unsized array forward declaration
2018-07-24Merge branch 'mh/fast-import-no-diff-delta-empty'Junio C Hamano
"git fast-import" has been updated to avoid attempting to create delta against a zero-byte-long string, which is pointless. * mh/fast-import-no-diff-delta-empty: fast-import: do not call diff_delta() with empty buffer
2018-07-24Merge branch 'kn/userdiff-php'Junio C Hamano
The userdiff pattern for .php has been updated. * kn/userdiff-php: userdiff: support new keywords in PHP hunk header t4018: add missing test cases for PHP
2018-07-24Merge branch 'jk/fetch-all-peeled-fix'Junio C Hamano
Test modernization. * jk/fetch-all-peeled-fix: t5500: prettify non-commit tag tests
2018-07-24Merge branch 'ag/rebase-p'Junio C Hamano
The help message shown in the editor to edit todo list in "rebase -p" has regressed recently, which has been corrected. * ag/rebase-p: git-rebase--preserve-merges: fix formatting of todo help message
2018-07-24Merge branch 'jt/connectivity-check-after-unshallow'Junio C Hamano
"git fetch" failed to correctly validate the set of objects it received when making a shallow history deeper, which has been corrected. * jt/connectivity-check-after-unshallow: fetch-pack: write shallow, then check connectivity fetch-pack: implement ref-in-want fetch-pack: put shallow info in output parameter fetch: refactor to make function args narrower fetch: refactor fetch_refs into two functions fetch: refactor the population of peer ref OIDs upload-pack: test negotiation with changing repository upload-pack: implement ref-in-want test-pkt-line: add unpack-sideband subcommand
2018-07-24Merge branch 'jk/for-each-ref-icase'Junio C Hamano
The "--ignore-case" option of "git for-each-ref" (and its friends) did not work correctly, which has been fixed. * jk/for-each-ref-icase: ref-filter: avoid backend filtering with --ignore-case for-each-ref: consistently pass WM_IGNORECASE flag t6300: add a test for --ignore-case
2018-07-24Merge branch 'en/t5407-rebase-m-fix'Junio C Hamano
* en/t5407-rebase-m-fix: t5407: fix test to cover intended arguments
2018-07-24Merge branch 'en/apply-comment-fix'Junio C Hamano
* en/apply-comment-fix: apply: fix grammar error in comment
2018-07-24Merge branch 'en/rebase-consistency'Junio C Hamano
"git rebase" behaved slightly differently depending on which one of the three backends gets used; this has been documented and an effort to make them more uniform has begun. * en/rebase-consistency: git-rebase: make --allow-empty-message the default t3401: add directory rename testcases for rebase and am git-rebase.txt: document behavioral differences between modes directory-rename-detection.txt: technical docs on abilities and limitations git-rebase.txt: address confusion between --no-ff vs --force-rebase git-rebase: error out when incompatible options passed t3422: new testcases for checking when incompatible options passed git-rebase.sh: update help messages a bit git-rebase.txt: document incompatible options
2018-07-24Merge branch 'sb/submodule-move-head-error-msg'Junio C Hamano
"git checkout --recurse-submodules another-branch" did not report in which submodule it failed to update the working tree, which resulted in an unhelpful error message. * sb/submodule-move-head-error-msg: submodule.c: report the submodule that an error occurs in
2018-07-24Merge branch 'rj/submodule-fsck-skip'Junio C Hamano
"fsck.skipList" did not prevent a blob object listed there from being inspected for is contents (e.g. we recently started to inspect the contents of ".gitmodules" for certain malicious patterns), which has been corrected. * rj/submodule-fsck-skip: fsck: check skiplist for object in fsck_blob()
2018-07-18Third batch for 2.19 cycleJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-18Merge branch 'js/enhanced-version-info'Junio C Hamano
Build fix. * js/enhanced-version-info: Makefile: fix the "built from commit" code
2018-07-18Merge branch 'sb/mailmap'Junio C Hamano
* sb/mailmap: .mailmap: merge different spellings of names
2018-07-18Merge branch 'ms/core-icase-doc'Junio C Hamano
Clarify that setting core.ignoreCase to deviate from reality would not turn a case-incapable filesystem into a case-capable one. * ms/core-icase-doc: Documentation: declare "core.ignoreCase" as internal variable
2018-07-18Merge branch 'ds/commit-graph'Junio C Hamano
Docfix. * ds/commit-graph: commit-graph: fix documentation inconsistencies
2018-07-18Merge branch 'tz/exclude-doc-smallfixes'Junio C Hamano
Doc updates. * tz/exclude-doc-smallfixes: dir.c: fix typos in core.excludesfile comment gitignore.txt: clarify default core.excludesfile path
2018-07-18Merge branch 'js/rebase-recreate-merge'Junio C Hamano
Docfix. * js/rebase-recreate-merge: rebase: fix documentation formatting
2018-07-18Merge branch 'en/rebase-i-microfixes'Junio C Hamano
* en/rebase-i-microfixes: git-rebase--merge: modernize "git-$cmd" to "git $cmd" Fix use of strategy options with interactive rebases t3418: add testcase showing problems with rebase -i and strategy options
2018-07-18Merge branch 'mb/filter-branch-optim'Junio C Hamano
"git filter-branch" when used with the "--state-branch" option still attempted to rewrite the commits whose filtered result is known from the previous attempt (which is recorded on the state branch); the command has been corrected not to waste cycles doing so. * mb/filter-branch-optim: filter-branch: skip commits present on --state-branch
2018-07-18Merge branch 'dj/runtime-prefix'Junio C Hamano
POSIX portability fix in Makefile to fix a glitch introduced a few releases ago. * dj/runtime-prefix: Makefile: tweak sed invocation
2018-07-18Merge branch 'ao/config-from-gitmodules'Junio C Hamano
Tighten the API to make it harder to misuse in-tree .gitmodules file, even though it shares the same syntax with configuration files, to read random configuration items from it. * ao/config-from-gitmodules: submodule-config: reuse config_from_gitmodules in repo_read_gitmodules submodule-config: pass repository as argument to config_from_gitmodules submodule-config: make 'config_from_gitmodules' private submodule-config: add helper to get 'update-clone' config from .gitmodules submodule-config: add helper function to get 'fetch' config from .gitmodules config: move config_from_gitmodules to submodule-config.c
2018-07-18Merge branch 'jk/branch-l-0-deprecation'Junio C Hamano
The "-l" option in "git branch -l" is an unfortunate short-hand for "--create-reflog", but many users, both old and new, somehow expect it to be something else, perhaps "--list". This step warns when "-l" is used as a short-hand for "--create-reflog" and warns about the future repurposing of the it when it is used. * jk/branch-l-0-deprecation: branch: deprecate "-l" option t: switch "branch -l" to "branch --create-reflog" t3200: unset core.logallrefupdates when testing reflog creation
2018-07-18Merge branch 'tb/grep-column'Junio C Hamano
"git grep" learned the "--column" option that gives not just the line number but the column number of the hit. * tb/grep-column: contrib/git-jump/git-jump: jump to exact location grep.c: add configuration variables to show matched option builtin/grep.c: add '--column' option to 'git-grep(1)' grep.c: display column number of first match grep.[ch]: extend grep_opt to allow showing matched column grep.c: expose {,inverted} match column in match_line() Documentation/config.txt: camel-case lineNumber for consistency
2018-07-18Merge branch 'vs/typofixes'Junio C Hamano
Doc fix. * vs/typofixes: Documentation: spelling and grammar fixes
2018-07-18Merge branch 'bw/protocol-v2'Junio C Hamano
Doc fix. * bw/protocol-v2: protocol-v2 doc: put HTTP headers after request
2018-07-18Merge branch 'jt/remove-pack-bitmap-global'Junio C Hamano
The effort to move globals to per-repository in-core structure continues. * jt/remove-pack-bitmap-global: pack-bitmap: add free function pack-bitmap: remove bitmap_git global variable
2018-07-18Merge branch 'bw/config-refer-to-gitsubmodules-doc'Junio C Hamano
Docfix. * bw/config-refer-to-gitsubmodules-doc: docs: link to gitsubmodules
2018-07-18Merge branch 'xy/format-patch-prereq-patch-id-fix'Junio C Hamano
Recently added "--base" option to "git format-patch" command did not correctly generate prereq patch ids. * xy/format-patch-prereq-patch-id-fix: format-patch: clear UNINTERESTING flag before prepare_bases
2018-07-18Merge branch 'pw/rebase-i-keep-reword-after-conflict'Junio C Hamano
Bugfix for "rebase -i" corner case regression. * pw/rebase-i-keep-reword-after-conflict: sequencer: do not squash 'reword' commits when we hit conflicts
2018-07-18Merge branch 'ld/p423'Junio C Hamano
Code preparation to make "git p4" closer to be usable with Python 3. * ld/p423: git-p4: python3: fix octal constants git-p4: python3: use print() function git-p4: python3: basestring workaround git-p4: python3: remove backticks git-p4: python3: replace dict.has_key(k) with "k in dict" git-p4: python3: replace <> with !=