summaryrefslogtreecommitdiff
path: root/Documentation
AgeCommit message (Collapse)AuthorFilesLines
2017-03-21Sync with maintLibravatar Junio C Hamano1-0/+61
2017-03-21Sixth batch for 2.13Libravatar Junio C Hamano1-17/+23
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-21Merge branch 'nd/commit-hook-doc-fix'Libravatar Junio C Hamano1-1/+1
Doc fix. * nd/commit-hook-doc-fix: git-commit.txt: list post-rewrite in HOOKS section
2017-03-21Merge branch 'ab/push-default-doc-fix'Libravatar Junio C Hamano1-0/+2
Doc fix. * ab/push-default-doc-fix: push: mention "push.default=tracking" in the documentation
2017-03-21Merge branch 'ab/doc-no-option-notation-fix'Libravatar Junio C Hamano2-2/+2
Doc fix. * ab/doc-no-option-notation-fix: doc: change erroneous --[no]-whatever into --[no-]whatever
2017-03-21Merge branch 'nd/conditional-config-include'Libravatar Junio C Hamano1-7/+69
The configuration file learned a new "includeIf.<condition>.path" that includes the contents of the given path only when the condition holds. This allows you to say "include this work-related bit only in the repositories under my ~/work/ directory". * nd/conditional-config-include: config: add conditional include config.txt: reflow the second include.path paragraph config.txt: clarify multiple key values in include.path
2017-03-21Prepare for 2.12.2Libravatar Junio C Hamano1-0/+61
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-21Merge branch 'dt/gc-ignore-old-gc-logs' into maintLibravatar Junio C Hamano1-0/+6
A "gc.log" file left by a backgrounded "gc --auto" disables further automatic gc; it has been taught to run at least once a day (by default) by ignoring a stale "gc.log" file that is too old. * dt/gc-ignore-old-gc-logs: gc: ignore old gc.log files
2017-03-21Merge branch 'ps/docs-diffcore' into maintLibravatar Junio C Hamano1-5/+5
Doc update. * ps/docs-diffcore: docs/diffcore: unquote "Complete Rewrites" in headers docs/diffcore: fix grammar in diffcore-rename header
2017-03-20Sync with 2.12.1Libravatar Junio C Hamano1-1/+2
2017-03-20Git 2.12.1Libravatar Junio C Hamano1-1/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20push: mention "push.default=tracking" in the documentationLibravatar Ævar Arnfjörð Bjarmason1-0/+2
Change the documentation for push.tracking=* to re-include a mention of what "tracking" does. The "tracking" option was renamed to "upstream" back in 53c4031 ("push.default: Rename 'tracking' to 'upstream'", 2011-02-16), this section was then subsequently rewritten in 87a70e4 ("config doc: rewrite push.default section", 2013-06-19) to remove any mention of "tracking". Maybe we should just warn or die nowadays if this option is in the config, but I had some old config of mine use this option, I'd forgotten that it was a synonym, and nothing in git's documentation mentioned that. That's bad, either we shouldn't support it at all, or we should document what it does. This patch does the latter. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20git-commit.txt: list post-rewrite in HOOKS sectionLibravatar Nguyễn Thái Ngọc Duy1-1/+1
The hook was added in a86ed83cce (Merge branch 'tr/notes-display' - 2010-03-24), which updated githooks.txt but not git-commit.txt. git-commit.txt was later updated in e858af6d50 (commit: document a couple of options - 2012-06-08). Since this commit focused on command line options, this section was probably forgotten. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20doc: change erroneous --[no]-whatever into --[no-]whateverLibravatar Ævar Arnfjörð Bjarmason2-2/+2
Change these two obvious typos to be in line with the rest of the documentation, which uses the correct --[no-]whatever form. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-17Fifth batch for 2.13Libravatar Junio C Hamano1-9/+54
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-17Merge branch 'bw/attr-pathspec'Libravatar Junio C Hamano1-0/+21
The pathspec mechanism learned to further limit the paths that match the pattern to those that have specified attributes attached via the gitattributes mechanism. * bw/attr-pathspec: pathspec: allow escaped query values pathspec: allow querying for attributes
2017-03-17Merge branch 'sb/rev-parse-show-superproject-root'Libravatar Junio C Hamano1-0/+6
From a working tree of a repository, a new option of "rev-parse" lets you ask if the repository is used as a submodule of another project, and where the root level of the working tree of that project (i.e. your superproject) is. * sb/rev-parse-show-superproject-root: rev-parse: add --show-superproject-working-tree
2017-03-17Merge branch 'cc/split-index-config'Libravatar Junio C Hamano2-8/+64
The experimental "split index" feature has gained a few configuration variables to make it easier to use. * cc/split-index-config: (22 commits) Documentation/git-update-index: explain splitIndex.* Documentation/config: add splitIndex.sharedIndexExpire read-cache: use freshen_shared_index() in read_index_from() read-cache: refactor read_index_from() t1700: test shared index file expiration read-cache: unlink old sharedindex files config: add git_config_get_expiry() from gc.c read-cache: touch shared index files when used sha1_file: make check_and_freshen_file() non static Documentation/config: add splitIndex.maxPercentChange t1700: add tests for splitIndex.maxPercentChange read-cache: regenerate shared index if necessary config: add git_config_get_max_percent_split_change() Documentation/git-update-index: talk about core.splitIndex config var Documentation/config: add information for core.splitIndex t1700: add tests for core.splitIndex update-index: warn in case of split-index incoherency read-cache: add and then use tweak_split_index() split-index: add {add,remove}_split_index() functions config: add git_config_get_split_index() ...
2017-03-16Sync with 'maint'Libravatar Junio C Hamano1-0/+41
* maint: Preparing for 2.12.1
2017-03-16Preparing for 2.12.1Libravatar Junio C Hamano1-0/+41
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-14Fourth batch after 2.12Libravatar Junio C Hamano1-0/+42
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-14Merge branch 'dp/filter-branch-prune-empty'Libravatar Junio C Hamano1-8/+6
"git filter-branch --prune-empty" drops a single-parent commit that becomes a no-op, but did not drop a root commit whose tree is empty. * dp/filter-branch-prune-empty: p7000: add test for filter-branch with --prune-empty filter-branch: fix --prune-empty on parentless commits t7003: ensure --prune-empty removes entire branch when applicable t7003: ensure --prune-empty can prune root commit
2017-03-13pathspec: allow querying for attributesLibravatar Brandon Williams1-0/+21
The pathspec mechanism is extended via the new ":(attr:eol=input)pattern/to/match" syntax to filter paths so that it requires paths to not just match the given pattern but also have the specified attrs attached for them to be chosen. Based on a patch by Stefan Beller <sbeller@google.com> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-12Third batch after 2.12Libravatar Junio C Hamano1-0/+39
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-12Merge branch 'ah/doc-ls-files-quotepath'Libravatar Junio C Hamano9-39/+48
Documentation for "git ls-files" did not refer to core.quotePath * ah/doc-ls-files-quotepath: Documentation: improve description for core.quotePath
2017-03-11config: add conditional includeLibravatar Nguyễn Thái Ngọc Duy1-0/+63
Sometimes a set of repositories want to share configuration settings among themselves that are distinct from other such sets of repositories. A user may work on two projects, each of which have multiple repositories, and use one user.email for one project while using another for the other. Setting $GIT_DIR/.config works, but if the penalty of forgetting to update $GIT_DIR/.config is high (especially when you end up cloning often), it may not be the best way to go. Having the settings in ~/.gitconfig, which would work for just one set of repositories, would not well in such a situation. Having separate ${HOME}s may add more problems than it solves. Extend the include.path mechanism that lets a config file include another config file, so that the inclusion can be done only when some conditions hold. Then ~/.gitconfig can say "include config-project-A only when working on project-A" for each project A the user works on. In this patch, the only supported grouping is based on $GIT_DIR (in absolute path), so you would need to group repositories by directory, or something like that to take advantage of it. We already have include.path for unconditional includes. This patch goes with includeIf.<condition>.path to make it clearer that a condition is required. The new config has the same backward compatibility approach as include.path: older git versions that don't understand includeIf will simply ignore them. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-11config.txt: reflow the second include.path paragraphLibravatar Nguyễn Thái Ngọc Duy1-5/+4
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-11config.txt: clarify multiple key values in include.pathLibravatar Nguyễn Thái Ngọc Duy1-2/+2
The phrasing in this paragraph may give an impression that you can only use it once. Rephrase it a bit. Helped-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-10Second batch after 2.12Libravatar Junio C Hamano1-0/+65
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-10Merge branch 'tg/stash-push'Libravatar Junio C Hamano1-6/+19
"git stash save" takes a pathspec so that the local changes can be stashed away only partially. * tg/stash-push: stash: allow pathspecs in the no verb form stash: use stash_push for no verb form stash: teach 'push' (and 'create_stash') to honor pathspec stash: refactor stash_create stash: add test for the create command line arguments stash: introduce push verb
2017-03-10Merge branch 'sb/submodule-init-url-selection'Libravatar Junio C Hamano1-14/+24
When "git submodule init" decides that the submodule in the working tree is its upstream, it now gives a warning as it is not a very common setup. * sb/submodule-init-url-selection: submodule init: warn about falling back to a local path
2017-03-10Merge branch 'ps/docs-diffcore'Libravatar Junio C Hamano1-5/+5
Doc update. * ps/docs-diffcore: docs/diffcore: unquote "Complete Rewrites" in headers docs/diffcore: fix grammar in diffcore-rename header
2017-03-08rev-parse: add --show-superproject-working-treeLibravatar Stefan Beller1-0/+6
In some situations it is useful to know if the given repository is a submodule of another repository. Add the flag --show-superproject-working-tree to git-rev-parse to make it easy to find out if there is a superproject. When no superproject exists, the output will be empty. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-06Documentation/git-update-index: explain splitIndex.*Libravatar Christian Couder2-9/+30
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-06Documentation/config: add splitIndex.sharedIndexExpireLibravatar Christian Couder1-0/+12
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-03filter-branch: fix --prune-empty on parentless commitsLibravatar Devin J. Pohly1-8/+6
Previously, the git_commit_non_empty_tree function would always pass any commit with no parents to git-commit-tree, regardless of whether the tree was nonempty. The new commit would then be recorded in the filter-branch revision map, and subsequent commits which leave the tree untouched would be correctly filtered. With this change, parentless commits with an empty tree are correctly pruned, and an empty file is recorded in the revision map, signifying that it was rewritten to "no commits." This works naturally with the parent mapping for subsequent commits. Signed-off-by: Devin J. Pohly <djpohly@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-02Documentation: improve description for core.quotePathLibravatar Andreas Heiduk9-39/+48
Linking the description for pathname quoting to the configuration variable "core.quotePath" removes inconstistent and incomplete sections while also giving two hints how to deal with it: Either with "-c core.quotePath=false" or with "-z". Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-01Documentation/config: add splitIndex.maxPercentChangeLibravatar Christian Couder1-0/+13
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-01Documentation/git-update-index: talk about core.splitIndex config varLibravatar Christian Couder1-0/+6
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-01Documentation/config: add information for core.splitIndexLibravatar Christian Couder1-0/+4
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-28stash: allow pathspecs in the no verb formLibravatar Thomas Gummerer1-4/+7
Now that stash_push is used in the no verb form of stash, allow specifying the command line for this form as well. Always use -- to disambiguate pathspecs from other non-option arguments. Also make git stash -p an alias for git stash push -p. This allows users to use git stash -p <pathspec>. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-28stash: use stash_push for no verb formLibravatar Thomas Gummerer1-4/+4
Now that we have stash_push, which accepts pathspec arguments, use it instead of stash_save in git stash without any additional verbs. Previously we allowed git stash -- -message, which is no longer allowed after this patch. Messages starting with a hyphen was allowed since 3c2eb80f, ("stash: simplify defaulting to "save" and reject unknown options"). However it was never the intent to allow that, but rather it was allowed accidentally. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-28stash: teach 'push' (and 'create_stash') to honor pathspecLibravatar Thomas Gummerer1-1/+8
While working on a repository, it's often helpful to stash the changes of a single or multiple files, and leave others alone. Unfortunately git currently offers no such option. git stash -p can be used to work around this, but it's often impractical when there are a lot of changes over multiple files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-28submodule init: warn about falling back to a local pathLibravatar Stefan Beller1-14/+24
When a submodule is initialized, the config variable 'submodule.<name>.url' is set depending on the value of the same variable in the .gitmodules file. When the URL indicates to be relative, then the url is computed relative to its default remote. The default remote cannot be determined accurately in all cases, such that it falls back to 'origin'. The 'origin' remote may not exist, though. In that case we give up looking for a suitable remote and we'll just assume it to be a local relative path. This can be confusing to users as there is a lot of guessing involved, which is not obvious to the user. So in the corner case of assuming a local autoritative truth, warn the user to lessen the confusion. This behavior was introduced in 4d6893200 (submodule add: allow relative repository path even when no url is set, 2011-06-06), which shared the code with submodule-init and then ported to C in 3604242f080a (submodule: port init from shell to C, 2016-04-15). In case of submodule-add, this behavior makes sense in some use cases[1], however for submodule-init there does not seem to be an immediate obvious use case to fall back to a local submodule. However there might be, so warn instead of die here. While adding the warning, also clarify the behavior of relative URLs in the documentation. [1] e.g. http://stackoverflow.com/questions/8721984/git-ignore-files-for-public-repository-but-not-for-private "store a secret locally in a submodule, with no intention to publish it" Reported-by: Shawn Pearce <spearce@spearce.org> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-28docs/diffcore: unquote "Complete Rewrites" in headersLibravatar Patrick Steinhardt1-4/+4
The gitdiffcore documentation quotes the term "Complete Rewrites" in headers for no real gain. This would make sense if the term could be easily confused if not properly grouped together. But actually, the term is quite obvious and thus does not really need any quoting, especially regarding that it is not used anywhere else. But more importanly, this brings up a bug when rendering man pages: when trying to render quotes inside of a section header, we end up with quotes which have been misaligned to the end of line. E.g. diffcore-break: For Splitting Up Complete Rewrites -------------------------------------------------- renders as DIFFCORE-BREAK: FOR SPLITTING UP COMPLETE REWRITES"" , which is obviously wrong. While this is fixable for the man pages by using double-quotes (e.g. ""COMPLETE REWRITES""), this again breaks it for our generated HTML pages. So fix the issue by simply dropping quotes inside of section headers, which is currently only done for the term "Complete Rewrites". Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-28docs/diffcore: fix grammar in diffcore-rename headerLibravatar Patrick Steinhardt1-1/+1
Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-27First batch after 2.12Libravatar Junio C Hamano1-0/+151
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-27Merge branch 'dt/gc-ignore-old-gc-logs'Libravatar Junio C Hamano1-0/+6
A "gc.log" file left by a backgrounded "gc --auto" disables further automatic gc; it has been taught to run at least once a day (by default) by ignoring a stale "gc.log" file that is too old. * dt/gc-ignore-old-gc-logs: gc: ignore old gc.log files
2017-02-27Merge branch 'sf/putty-w-args'Libravatar Junio C Hamano2-0/+17
The command line options for ssh invocation needs to be tweaked for some implementations of SSH (e.g. PuTTY plink wants "-P <port>" while OpenSSH wants "-p <port>" to specify port to connect to), and the variant was guessed when GIT_SSH environment variable is used to specify it. The logic to guess now applies to the command specified by the newer GIT_SSH_COMMAND and also core.sshcommand configuration variable, and comes with an escape hatch for users to deal with misdetected cases. * sf/putty-w-args: connect.c: stop conflating ssh command names and overrides connect: Add the envvar GIT_SSH_VARIANT and ssh.variant config git_connect(): factor out SSH variant handling connect: rename tortoiseplink and putty variables connect: handle putty/plink also in GIT_SSH_COMMAND
2017-02-27Merge branch 'bw/attr'Libravatar Junio C Hamano2-34/+62
The gitattributes machinery is being taught to work better in a multi-threaded environment. * bw/attr: (27 commits) attr: reformat git_attr_set_direction() function attr: push the bare repo check into read_attr() attr: store attribute stack in attr_check structure attr: tighten const correctness with git_attr and match_attr attr: remove maybe-real, maybe-macro from git_attr attr: eliminate global check_all_attr array attr: use hashmap for attribute dictionary attr: change validity check for attribute names to use positive logic attr: pass struct attr_check to collect_some_attrs attr: retire git_check_attrs() API attr: convert git_check_attrs() callers to use the new API attr: convert git_all_attrs() to use "struct attr_check" attr: (re)introduce git_check_attr() and struct attr_check attr: rename function and struct related to checking attributes attr.c: outline the future plans by heavily commenting Documentation: fix a typo attr.c: add push_stack() helper attr: support quoting pathname patterns in C style attr.c: plug small leak in parse_attr_line() attr.c: tighten constness around "git_attr" structure ...