summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-08-31push doc: correct lies about how push refspecs workLibravatar Ævar Arnfjörð Bjarmason2-11/+48
There's complex rules governing whether a push is allowed to take place depending on whether we're pushing to refs/heads/*, refs/tags/* or refs/not-that/*. See is_branch() in refs.c, and the various assertions in refs/files-backend.c. (e.g. "trying to write non-commit object %s to branch '%s'"). This documentation has never been quite correct, but went downhill after dbfeddb12e ("push: require force for refs under refs/tags/", 2012-11-29) when we started claiming that <dst> couldn't be a tag object, which is incorrect. After some of the logic in that patch was changed in 256b9d70a4 ("push: fix "refs/tags/ hierarchy cannot be updated without --force"", 2013-01-16) the docs weren't updated, and we've had some version of documentation that confused whether <src> was a tag or not with whether <dst> would accept either an annotated tag object or the commit it points to. This makes the intro somewhat more verbose & complex, perhaps we should have a shorter description here and split the full complexity into a dedicated section. Very few users will find themselves needing to e.g. push blobs or trees to refs/custom-namespace/* (or blobs or trees at all), and that could be covered separately as an advanced topic. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-31push doc: move mention of "tag <tag>" later in the proseLibravatar Ævar Arnfjörð Bjarmason1-2/+2
This change will be followed-up with a subsequent change where I'll change both sides of this mention of "tag <tag>" to be something that's best read without interruption. To make that change smaller, let's move this mention of "tag <tag>" to the end of the "<refspec>..." section, it's now somewhere in the middle. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-31push doc: remove confusing mention of remote mergerLibravatar Ævar Arnfjörð Bjarmason1-2/+1
Saying that "git push <remote> <src>:<dst>" won't push a merger of <src> and <dst> to <dst> is clear from the rest of the context here, so mentioning it is redundant, furthermore the mention of "EXAMPLES below" isn't specific or useful. This phrase was originally added in 149f6ddfb3 ("Docs: Expand explanation of the use of + in git push refspecs.", 2009-02-19), as can be seen in that change the point of the example being cited was to show that force pushing can leave unreferenced commits on the remote. It's enough that we explain that in its own section, it doesn't need to be mentioned here. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-31fetch tests: add a test for clobbering tag behaviorLibravatar Ævar Arnfjörð Bjarmason1-0/+24
The test suite only incidentally (and unintentionally) tested for the current behavior of eager tag clobbering on "fetch". This is a followup to 380efb65df ("push tests: assert re-pushing annotated tags", 2018-07-31) which tests for it explicitly. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-31push tests: use spaces in interpolated stringLibravatar Ævar Arnfjörð Bjarmason1-1/+1
The quoted -m'msg' option would mean the same as -mmsg when passed through the test_force_push_tag helper. Let's instead use a string with spaces in it, to have a working example in case we need to pass other whitespace-delimited arguments to git-tag. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-31push tests: make use of unused $1 in test descriptionLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Fix up a logic error in 380efb65df ("push tests: assert re-pushing annotated tags", 2018-07-31), where the $tag_type_description variable was assigned to but never used, unlike in the subsequently added companion test for fetches in 2d216a7ef6 ("fetch tests: add a test for clobbering tag behavior", 2018-04-29). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-31fetch: change "branch" to "reference" in --force -h outputLibravatar Ævar Arnfjörð Bjarmason1-1/+1
The -h output has been referring to the --force command as forcing the overwriting of local branches, but since "fetch" more generally fetches all sorts of references in all refs/ namespaces, let's talk about forcing the update of a a "reference" instead. This wording was initially introduced in 8320199873 ("Rewrite builtin-fetch option parsing to use parse_options().", 2007-12-04). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-13pull doc: fix a long-standing grammar errorLibravatar Ævar Arnfjörð Bjarmason1-1/+1
It should be "is not an empty string" not "is not empty string". This fixes wording originally introduced in ab9b31386b ("Documentation: multi-head fetch.", 2005-08-24). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-13fetch tests: correct a comment "remove it" -> "remove them"Libravatar Ævar Arnfjörð Bjarmason1-1/+1
Correct a comment referring to the removal of just the branch to also refer to the tag. This should have been changed in my ca3065e7e7 ("fetch tests: add a tag to be deleted to the pruning tests", 2018-02-09) when the tag deletion was added, but I missed it at the time. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-31push tests: assert re-pushing annotated tagsLibravatar Ævar Arnfjörð Bjarmason1-37/+45
Change the test that asserts that lightweight tags can only be clobbered by a force-push to check do the same tests for annotated tags. There used to be less exhaustive tests for this with the code added in 40eff17999 ("push: require force for annotated tags", 2012-11-29), but Junio removed them in 256b9d70a4 ("push: fix "refs/tags/ hierarchy cannot be updated without --force"", 2013-01-16) while fixing some of the behavior around tag pushing. That change left us without any coverage asserting that pushing and clobbering annotated tags worked as intended. There was no reason to suspect that the receive machinery wouldn't behave the same way with annotated tags, but now we know for sure. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-31push tests: add more testing for forced tag pushingLibravatar Ævar Arnfjörð Bjarmason1-2/+20
Improve the tests added in dbfeddb12e ("push: require force for refs under refs/tags/", 2012-11-29) to assert that the same behavior applies various other combinations of command-line option and refspecs. Supplying either "+" in refspec or "--force" is sufficient to clobber the reference. With --no-force we still pay attention to "+" in the refspec, and vice-versa with clobbering kicking in if there's no "+" in the refspec but "+" is given. This is consistent with how refspecs work for branches, where either "+" or "--force" will enable clobbering, with neither taking priority over the other. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-31push tests: fix logic error in "push" test assertionLibravatar Ævar Arnfjörð Bjarmason1-2/+2
Fix a logic error that's been here since this test was added in dbfeddb12e ("push: require force for refs under refs/tags/", 2012-11-29). The intent of this test is to force-create a new tag pointing to HEAD~, and then assert that pushing it doesn't work without --force. Instead, the code was not creating a new tag at all, and then failing to push the previous tag for the unrelated reason of providing a refspec that doesn't make any sense. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-31push tests: remove redundant 'git push' invocationLibravatar Ævar Arnfjörð Bjarmason1-1/+0
Remove an invocation of 'git push' that's exactly the same as the one on the preceding line. This was seemingly added by mistake in dbfeddb12e ("push: require force for refs under refs/tags/", 2012-11-29) and doesn't affect the result of the test, the second "push" was a no-op as there was nothing new to push. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-31fetch tests: change "Tag" test tag to "testTag"Libravatar Ævar Arnfjörð Bjarmason1-9/+9
Calling the test tag "Tag" will make for confusing reading later in this series when making use of the "git push tag <name>" feature. Let's call the tag testTag instead. Changes code initially added in dbfeddb12e ("push: require force for refs under refs/tags/", 2012-11-29). 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 cycleLibravatar Junio C Hamano1-0/+80
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-24Merge branch 'as/sequencer-customizable-comment-char'Libravatar Junio C Hamano1-1/+1
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'Libravatar Junio C Hamano1-1/+3
Code clean-up. * sb/blame-color: blame: prefer xsnprintf to strcpy for colors
2018-07-24Merge branch 'nd/command-list'Libravatar Junio C Hamano1-2/+2
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'Libravatar Junio C Hamano3-7/+32
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'Libravatar Junio C Hamano3-1/+29
"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'Libravatar Junio C Hamano1-1/+8
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'Libravatar Junio C Hamano2-1/+60
"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'Libravatar Junio C Hamano3-18/+3
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'Libravatar Junio C Hamano2-5/+14
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'Libravatar Junio C Hamano3-31/+17
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'Libravatar Junio C Hamano8-7/+91
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'Libravatar Junio C Hamano3-29/+91
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'Libravatar Junio C Hamano1-13/+28
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'Libravatar Junio C Hamano7-12/+26
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'Libravatar Junio C Hamano1-12/+15
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'Libravatar Junio C Hamano1-1/+1
"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'Libravatar Junio C Hamano8-1/+35
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'Libravatar Junio C Hamano1-6/+13
Test modernization. * jk/fetch-all-peeled-fix: t5500: prettify non-commit tag tests
2018-07-24Merge branch 'ag/rebase-p'Libravatar Junio C Hamano1-2/+2
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'Libravatar Junio C Hamano22-82/+837
"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'Libravatar Junio C Hamano2-1/+21
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'Libravatar Junio C Hamano1-1/+1
* en/t5407-rebase-m-fix: t5407: fix test to cover intended arguments
2018-07-24Merge branch 'en/apply-comment-fix'Libravatar Junio C Hamano1-1/+1
* en/apply-comment-fix: apply: fix grammar error in comment
2018-07-24Merge branch 'en/rebase-consistency'Libravatar Junio C Hamano7-42/+462
"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'Libravatar Junio C Hamano2-2/+3
"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'Libravatar Junio C Hamano1-2/+11
"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 cycleLibravatar Junio C Hamano1-1/+59
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-18Merge branch 'js/enhanced-version-info'Libravatar Junio C Hamano1-2/+3
Build fix. * js/enhanced-version-info: Makefile: fix the "built from commit" code
2018-07-18Merge branch 'sb/mailmap'Libravatar Junio C Hamano1-1/+10
* sb/mailmap: .mailmap: merge different spellings of names
2018-07-18Merge branch 'ms/core-icase-doc'Libravatar Junio C Hamano1-3/+6
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'Libravatar Junio C Hamano1-5/+5
Docfix. * ds/commit-graph: commit-graph: fix documentation inconsistencies
2018-07-18Merge branch 'tz/exclude-doc-smallfixes'Libravatar Junio C Hamano2-2/+2
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'Libravatar Junio C Hamano1-1/+1
Docfix. * js/rebase-recreate-merge: rebase: fix documentation formatting
2018-07-18Merge branch 'en/rebase-i-microfixes'Libravatar Junio C Hamano4-4/+41
* 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'Libravatar Junio C Hamano2-0/+16
"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