summaryrefslogtreecommitdiff
path: root/Documentation
AgeCommit message (Collapse)Author
2019-05-19Merge branch 'dl/difftool-mergetool'Junio C Hamano
Update "git difftool" and "git mergetool" so that the combinations of {diff,merge}.{tool,guitool} configuration variables serve as fallback settings of each other in a sensible order. * dl/difftool-mergetool: difftool: fallback on merge.guitool difftool: make --gui, --tool and --extcmd mutually exclusive mergetool: fallback to tool when guitool unavailable mergetool--lib: create gui_mode function mergetool: use get_merge_tool function t7610: add mergetool --gui tests t7610: unsuppress output
2019-05-19Merge branch 'dl/branch-from-3dot-merge-base'Junio C Hamano
"git branch new A...B" and "git checkout -b new A...B" have been taught that in their contexts, the notation A...B means "the merge base between these two commits", just like "git checkout A...B" detaches HEAD at that commit. * dl/branch-from-3dot-merge-base: branch: make create_branch accept a merge base rev t2018: cleanup in current test
2019-05-13Git 2.22-rc0v2.22.0-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-13Merge branch 'dl/rev-tilde-doc-clarify'Junio C Hamano
Docfix. * dl/rev-tilde-doc-clarify: revisions.txt: remove ambibuity between <rev>:<path> and :<path> revisions.txt: mention <rev>~ form revisions.txt: mark optional rev arguments with [] revisions.txt: change "rev" to "<rev>"
2019-05-13Merge branch 'jk/ls-files-doc-markup-fix'Junio C Hamano
Docfix. * jk/ls-files-doc-markup-fix: doc/ls-files: put nested list for "-t" option into block
2019-05-13Merge branch 'ew/repack-with-bitmaps-by-default'Junio C Hamano
The connectivity bitmaps are created by default in bare repositories now; also the pathname hash-cache is created by default to avoid making crappy deltas when repacking. * ew/repack-with-bitmaps-by-default: pack-objects: default to writing bitmap hash-cache t5310: correctly remove bitmaps for jgit test repack: enable bitmaps by default on bare repos
2019-05-13Merge branch 'jh/trace2-sid-fix'Junio C Hamano
Polishing of the new trace2 facility continues. The system-level configuration can specify site-wide trace2 settings, which can be overridden with per-user configuration and environment variables. * jh/trace2-sid-fix: trace2: fixup access problem on /etc/gitconfig in read_very_early_config trace2: update docs to describe system/global config settings trace2: make SIDs more unique trace2: clarify UTC datetime formatting trace2: report peak memory usage of the process trace2: use system/global config for default trace2 settings config: add read_very_early_config() trace2: find exec-dir before trace2 initialization trace2: add absolute elapsed time to start event trace2: refactor setting process starting time config: initialize opts structure in repo_read_config()
2019-05-13difftool: fallback on merge.guitoolDenton Liu
In git-difftool.txt, it says 'git difftool' falls back to 'git mergetool' config variables when the difftool equivalents have not been defined. However, when `diff.guitool` is missing, it doesn't fallback to anything. Make git-difftool fallback to `merge.guitool` when `diff.guitool` is missing. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-13mergetool: fallback to tool when guitool unavailableDenton Liu
In git-difftool, if the tool is called with --gui but `diff.guitool` is not set, it falls back to `diff.tool`. Make git-mergetool also fallback from `merge.guitool` to `merge.tool` if the former is undefined. If git-difftool, when called with `--gui`, were to use `get_configured_mergetool` in a future patch, it would also get the fallback behavior in the following precedence: 1. diff.guitool 2. merge.guitool 3. diff.tool 4. merge.tool The behavior for when difftool or mergetool are called without `--gui` should be identical with or without this patch. Note that the search loop could be written as sections="merge" keys="tool" if diff_mode then sections="diff $sections" fi if gui_mode then keys="guitool $keys" fi merge_tool=$( IFS=' ' for key in $keys do for section in $sections do selected=$(git config $section.$key) if test -n "$selected" then echo "$selected" return fi done done) which would make adding a mode in the future much easier. However, adding a new mode will likely never happen as it is highly discouraged so, as a result, it is written in its current form so that it is more readable for future readers. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-13mergetool: use get_merge_tool functionDenton Liu
In git-mergetool, the logic for getting which merge tool to use is duplicated in git-mergetool--lib, except for the fact that it needs to know whether the tool was guessed or not. Rewrite `get_merge_tool` to return whether or not the tool was guessed through the return code and make git-mergetool call this function instead of duplicating the logic. Note that 1 was chosen to be the return code of when a tool is guessed because it seems like a slightly more abnormal condition than getting a tool that's explicitly specified but this is completely arbitrary. Also, let `$GIT_MERGETOOL_GUI` be set to determine whether or not the guitool will be selected. This change is not completely backwards compatible as there may be external users of git-mergetool--lib. However, only one user, git-diffall[1], was found from searching GitHub and Google, and this tool is superseded by `git difftool --dir-diff` anyway. It seems very unlikely that there exists an external caller that would take into account the return code of `get_merge_tool` as it would always return 0 before this change so this change probably does not affect any external users. [1]: https://github.com/thenigan/git-diffall Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-08The eighth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-08Merge branch 'js/misc-doc-fixes'Junio C Hamano
"make check-docs", "git help -a", etc. did not account for cases where a particular build may deliberately omit some subcommands, which has been corrected. * js/misc-doc-fixes: Turn `git serve` into a test helper test-tool: handle the `-C <directory>` option just like `git` check-docs: do not bother checking for legacy scripts' documentation docs: exclude documentation for commands that have been excluded check-docs: allow command-list.txt to contain excluded commands help -a: do not list commands that are excluded from the build Makefile: drop the NO_INSTALL variable remote-testgit: move it into the support directory for t5801
2019-05-08Merge branch 'jt/clone-server-option'Junio C Hamano
"git clone" learned a new --server-option option when talking over the protocol version 2. * jt/clone-server-option: clone: send server options when using protocol v2 transport: die if server options are unsupported
2019-05-08Merge branch 'js/trace2-to-directory'Junio C Hamano
The trace2 tracing facility learned to auto-generate a filename when told to log to a directory. * js/trace2-to-directory: trace2: write to directory targets
2019-05-08Merge branch 'dl/merge-cleanup-scissors-fix'Junio C Hamano
The list of conflicted paths shown in the editor while concluding a conflicted merge was shown above the scissors line when the clean-up mode is set to "scissors", even though it was commented out just like the list of updated paths and other information to help the user explain the merge better. * dl/merge-cleanup-scissors-fix: cherry-pick/revert: add scissors line on merge conflict sequencer.c: save and restore cleanup mode merge: add scissors line on merge conflict merge: cleanup messages like commit parse-options.h: extract common --cleanup option commit: extract cleanup_mode functions to sequencer t7502: clean up style t7604: clean up style t3507: clean up style t7600: clean up style
2019-05-08Merge branch 'tz/git-svn-doc-markup-fix'Junio C Hamano
Doc formatting fix. * tz/git-svn-doc-markup-fix: Documentation/git-svn: improve asciidoctor compatibility
2019-05-08Merge branch 'dl/warn-tagging-a-tag'Junio C Hamano
"git tag" learned to give an advice suggesting it might be a mistake when creating an annotated or signed tag that points at another tag. * dl/warn-tagging-a-tag: tag: advise on nested tags tag: fix formatting
2019-05-08Merge branch 'en/merge-directory-renames'Junio C Hamano
"git merge-recursive" backend recently learned a new heuristics to infer file movement based on how other files in the same directory moved. As this is inherently less robust heuristics than the one based on the content similarity of the file itself (rather than based on what its neighbours are doing), it sometimes gives an outcome unexpected by the end users. This has been toned down to leave the renamed paths in higher/conflicted stages in the index so that the user can examine and confirm the result. * en/merge-directory-renames: merge-recursive: switch directory rename detection default merge-recursive: give callers of handle_content_merge() access to contents merge-recursive: track information associated with directory renames t6043: fix copied test description to match its purpose merge-recursive: switch from (oid,mode) pairs to a diff_filespec merge-recursive: cleanup handle_rename_* function signatures merge-recursive: track branch where rename occurred in rename struct merge-recursive: remove ren[12]_other fields from rename_conflict_info merge-recursive: shrink rename_conflict_info merge-recursive: move some struct declarations together merge-recursive: use 'ci' for rename_conflict_info variable name merge-recursive: rename locals 'o' and 'a' to 'obuf' and 'abuf' merge-recursive: rename diff_filespec 'one' to 'o' merge-recursive: rename merge_options argument from 'o' to 'opt' Use 'unsigned short' for mode, like diff_filespec does
2019-05-07revisions.txt: remove ambibuity between <rev>:<path> and :<path>Andreas Heiduk
The revision ':README' is mentioned as an example for '<rev>:<path>' but the explanation forwards to the ':<n>:<path>' syntax. At the same time ':<n>:<path>' did not mark the '<n>:' as optional. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-07revisions.txt: mention <rev>~ formDenton Liu
In revisions.txt, the '<rev>^' form is mentioned but the '<rev>~' form is missing. Although both forms are essentially equivalent (they each get the first parent of the specified revision), we should mention the latter for completeness. Make this change. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-07revisions.txt: mark optional rev arguments with []Denton Liu
In revisions.txt, an optional rev argument was not distinguised. Instead, a user had to continue and read the description in order to learn that the argument was optional. Since the [] notation for an optional argument is common-knowledge in the Git documentation, mark optional arguments with [] so that it's more obvious for the reader. Helped-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-07revisions.txt: change "rev" to "<rev>"Denton Liu
In revisions.txt, there were some instances of a rev argument being written as "rev". However, since they didn't mean the string literal, write "<rev>", instead. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-07branch: make create_branch accept a merge base revDenton Liu
When we ran something like $ git checkout -b test master... it would fail with the message fatal: Not a valid object name: 'master...'. This was caused by the call to `create_branch` where `start_name` is expected to be a valid rev. However, git-checkout allows the branch to be a valid _merge base_ rev (i.e. with a "...") so it was possible for an invalid rev to be passed in. Make `create_branch` accept a merge base rev so that this case does not error out. As a side-effect, teach git-branch how to handle merge base revs as well. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-25The seventh batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-25Merge branch 'tz/doc-apostrophe-no-longer-needed'Junio C Hamano
Doc formatting fix. * tz/doc-apostrophe-no-longer-needed: Documentation/git-show-branch: avoid literal {apostrophe}
2019-04-25Merge branch 'po/describe-not-necessarily-7'Junio C Hamano
Docfix. * po/describe-not-necessarily-7: describe doc: remove '7-char' abbreviation reference
2019-04-25Merge branch 'po/rerere-doc-fmt'Junio C Hamano
Docfix. * po/rerere-doc-fmt: rerere doc: quote `rerere.enabled`
2019-04-25Merge branch 'ab/gc-docs'Junio C Hamano
Update docs around "gc". * ab/gc-docs: gc docs: remove incorrect reference to gc.auto=0 gc docs: clarify that "gc" doesn't throw away referenced objects gc docs: note "gc --aggressive" in "fast-import" gc docs: downplay the usefulness of --aggressive gc docs: note how --aggressive impacts --window & --depth gc docs: fix formatting for "gc.writeCommitGraph" gc docs: re-flow the "gc.*" section in "config" gc docs: include the "gc.*" section from "config" in "gc" gc docs: clean grammar for "gc.bigPackThreshold" gc docs: stop noting "repack" flags gc docs: modernize the advice for manually running "gc"
2019-04-25Merge branch 'dl/submodule-set-branch'Junio C Hamano
"git submodule" learns "set-branch" subcommand that allows the submodule.*.branch settings to be modified. * dl/submodule-set-branch: submodule: teach set-branch subcommand submodule--helper: teach config subcommand --unset git-submodule.txt: "--branch <branch>" option defaults to 'master'
2019-04-25Merge branch 'en/fast-import-parsing-fix'Junio C Hamano
"git fast-import" update. * en/fast-import-parsing-fix: fast-import: fix erroneous handling of get-mark with empty orphan commits fast-import: only allow cat-blob requests where it makes sense fast-import: check most prominent commands first git-fast-import.txt: fix wording about where ls command can appear t9300: demonstrate bug with get-mark and empty orphan commits
2019-04-25Merge branch 'nd/checkout-m'Junio C Hamano
"git checkout -m <other>" was about carrying the differences between HEAD and the working-tree files forward while checking out another branch, and ignored the differences between HEAD and the index. The command has been taught to abort when the index and the HEAD are different. * nd/checkout-m: checkout: prevent losing staged changes with --merge read-tree: add --quiet unpack-trees: rename "gently" flag to "quiet" unpack-trees: keep gently check inside add_rejected_path
2019-04-25Merge branch 'js/difftool-no-index'Junio C Hamano
"git difftool" can now run outside a repository. * js/difftool-no-index: difftool: allow running outside Git worktrees with --no-index parse-options: make OPT_ARGUMENT() more useful difftool: remove obsolete (and misleading) comment
2019-04-25Merge branch 'bp/post-index-change-hook'Junio C Hamano
A new hook "post-index-change" is called when the on-disk index file changes, which can help e.g. a virtualized working tree implementation. * bp/post-index-change-hook: read-cache: add post-index-change hook
2019-04-23doc/ls-files: put nested list for "-t" option into blockJeff King
The description for the "-t" option contains a sub-list of all of the possible file status outputs. But because of the newline separating that list from the description paragraph, asciidoc treats the sub-list entries as a continuation of the overall options list, rather than as children of the "-t" description. We could fix it by adding a "+" before the sub-list to connect it to the rest of the "-t" text. But using a pair of "--" to delimit the block is perhaps more readable, and may have better compatibility with asciidoctor, as in 39a869b2f2 (Documentation/rev-list-options: wrap --date=<format> block with "--", 2019-03-30). The extra blank line comes from 5bc0e247c4 (Document ls-files -t as semi-obsolete., 2010-07-28), but the problem actually seems older than that. Before then, we did: -t:: some text... H:: cached M:: unmerged etc... but asciidoc also treats that as one big list. So this problem seems to have been around forever. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-22The sixth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-22Merge branch 'nd/read-tree-reset-doc'Junio C Hamano
The documentation for "git read-tree --reset -u" has been updated. * nd/read-tree-reset-doc: read-tree.txt: clarify --reset and worktree changes
2019-04-22Merge branch 'nd/interpret-trailers-docfix'Junio C Hamano
Doc update. * nd/interpret-trailers-docfix: interpret-trailers.txt: start the desc line with a capital letter
2019-04-22Merge branch 'sg/asciidoctor-in-ci'Junio C Hamano
Update our support to format documentation in the CI environment, either with AsciiDoc ro Asciidoctor. * sg/asciidoctor-in-ci: ci: fix AsciiDoc/Asciidoctor stderr check in the documentation build job ci: stick with Asciidoctor v1.5.8 for now ci: install Asciidoctor in 'ci/install-dependencies.sh' Documentation/technical/protocol-v2.txt: fix formatting Documentation/technical/api-config.txt: fix formatting Documentation/git-diff-tree.txt: fix formatting
2019-04-22Merge branch 'tz/asciidoctor-fixes'Junio C Hamano
Doc updates. * tz/asciidoctor-fixes: Documentation/git-status: fix titles in porcelain v2 section Documentation/rev-list-options: wrap --date=<format> block with "--"
2019-04-22Merge branch 'js/check-docs-exe'Junio C Hamano
Dev support update. * js/check-docs-exe: check-docs: fix for setups where executables have an extension check-docs: do not expect guide pages to correspond to commands check-docs: really look at the documented commands again docs: do not document the `git remote-testgit` command docs: move gitremote-helpers into section 7
2019-04-22Merge branch 'cb/doco-mono'Junio C Hamano
Clean-up markup in the documentation suite. * cb/doco-mono: doc: format pathnames and URLs as monospace. doc/CodingGuidelines: URLs and paths as monospace
2019-04-22Merge branch 'ps/stash-in-c'Junio C Hamano
"git stash" rewritten in C. * ps/stash-in-c: (28 commits) tests: add a special setup where stash.useBuiltin is off stash: optionally use the scripted version again stash: add back the original, scripted `git stash` stash: convert `stash--helper.c` into `stash.c` stash: replace all `write-tree` child processes with API calls stash: optimize `get_untracked_files()` and `check_changes()` stash: convert save to builtin stash: make push -q quiet stash: convert push to builtin stash: convert create to builtin stash: convert store to builtin stash: convert show to builtin stash: convert list to builtin stash: convert pop to builtin stash: convert branch to builtin stash: convert drop and clear to builtin stash: convert apply to builtin stash: mention options in `show` synopsis stash: add tests for `git stash show` config stash: rename test cases to be more descriptive ...
2019-04-19docs: exclude documentation for commands that have been excludedJohannes Schindelin
When building with certain build options, some commands are excluded from the build. For example, `git-credential-cache` is skipped when building with `NO_UNIX_SOCKETS`. Let's not build or package documentation for those excluded commands. This issue was pointed out rightfully when running `make check-docs` on Windows, where we do not yet have Unix sockets, and therefore the `credential-cache` command is excluded (yet its documentation was built and shipped). Note: building the documentation via `make -C Documentation` leaves the build system with no way to determine which commands have been excluded. If called thusly, we gracefully fail to exclude their documentation. Only when building the documentation via the top-level Makefile will it get excluded properly, or after building `Documentation/GIT-EXCLUDED-PROGRAMS` manually. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-19cherry-pick/revert: add scissors line on merge conflictDenton Liu
Fix a bug where the scissors line is placed after the Conflicts: section, in the case where a merge conflict occurs and commit.cleanup = scissors. Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-18merge: add scissors line on merge conflictDenton Liu
This fixes a bug where the scissors line is placed after the Conflicts: section, in the case where a merge conflict occurs and commit.cleanup = scissors. Next, if commit.cleanup = scissors is specified, don't produce a scissors line in commit if one already exists in the MERGE_MSG file. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-18merge: cleanup messages like commitDenton Liu
This change allows git-merge messages to be cleaned up with the commit.cleanup configuration or --cleanup option, just like how git-commit does it. We also give git-pull the option of --cleanup so that it can also take advantage of this change. Finally, add testing to ensure that messages are properly cleaned up. Note that some newlines that were added to the commit message were removed so that if a file were read via -F, it would be copied faithfully. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-18clone: send server options when using protocol v2Jonathan Tan
Commit 5e3548ef16 ("fetch: send server options when using protocol v2", 2018-04-24) taught "fetch" the ability to send server options when using protocol v2, but not "clone". This ability is triggered by "-o" or "--server-option". Teach "clone" the same ability, except that because "clone" already has "-o" for another parameter, teach "clone" only to receive "--server-option". Explain in the documentation, both for clone and for fetch, that server handling of server options are server-specific. This is similar to receive-pack's handling of push options - currently, they are just sent to hooks to interpret as they see fit. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-16The fifth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-16Merge branch 'nd/checkout-m-doc-update'Junio C Hamano
Doc about the above. * nd/checkout-m-doc-update: checkout.txt: note about losing staged changes with --merge
2019-04-16Merge branch 'ma/doc-diff-doc-vs-doctor-comparison'Junio C Hamano
Dev support update to make it easier to compare two formatted results from our documentation. * ma/doc-diff-doc-vs-doctor-comparison: doc-diff: add `--cut-header-footer` doc-diff: support diffing from/to AsciiDoc(tor) doc-diff: let `render_tree()` take an explicit directory name Doc: auto-detect changed build flags