summaryrefslogtreecommitdiff
path: root/Documentation
AgeCommit message (Collapse)AuthorFilesLines
2017-08-16diff: define block by number of alphanumeric charsLibravatar Jonathan Tan1-5/+3
The existing behavior of diff --color-moved=zebra does not define the minimum size of a block at all, instead relying on a heuristic applied later to filter out sets of adjacent moved lines that are shorter than 3 lines long. This can be confusing, because a block could thus be colored as moved at the source but not at the destination (or vice versa), depending on its neighbors. Instead, teach diff that the minimum size of a block is 20 alphanumeric characters, the same heuristic used by "git blame". This allows diff to still exclude uninteresting lines appearing on their own (such as those solely consisting of one or a few closing braces), as was the intention of the adjacent-moved-line heuristic. This requires a change in some tests in that some of their lines are no longer considered to be part of a block, because they are too short. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-30diff: document the new --color-moved settingLibravatar Stefan Beller2-2/+49
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-30hashmap: migrate documentation from Documentation/technical into headerLibravatar Stefan Beller1-309/+0
While at it, clarify the use of `key`, `keydata`, `entry_or_key` as well as documenting the new data pointer for the compare function. Rework the example. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-26Twelfth batch for 2.14Libravatar Junio C Hamano1-1/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-26Merge branch 'dt/raise-core-packed-git-limit'Libravatar Junio C Hamano1-1/+2
Doc update for a topic already in 'master'. * dt/raise-core-packed-git-limit: docs: update 64-bit core.packedGitLimit default
2017-06-26Merge branch 'lb/status-stash-count'Libravatar Junio C Hamano7-35/+49
"git status" learned to optionally give how many stash entries the user has in its output. * lb/status-stash-count: glossary: define 'stash entry' status: add optional stash count information stash: update documentation to use 'stash entry'
2017-06-24Sync with 2.13.2Libravatar Junio C Hamano2-12/+17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-24Git 2.13.2Libravatar Junio C Hamano1-0/+17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-24Merge branch 'sn/reset-doc-typofix' into maintLibravatar Junio C Hamano1-1/+1
Doc update. * sn/reset-doc-typofix: doc: git-reset: fix a trivial typo
2017-06-24Merge branch 'sg/doc-pretty-formats' into maintLibravatar Junio C Hamano1-2/+2
Doc update. * sg/doc-pretty-formats: docs/pretty-formats: stress that %- removes all preceding line-feeds
2017-06-24Merge branch 'sb/submodule-rm-absorb' into maintLibravatar Junio C Hamano1-4/+5
Doc update to a recently graduated topic. * sb/submodule-rm-absorb: Documentation/git-rm: correct submodule description
2017-06-24Eleventh batch for 2.14Libravatar Junio C Hamano1-15/+46
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-24Merge branch 'jk/warn-add-gitlink'Libravatar Junio C Hamano2-0/+10
Using "git add d/i/r" when d/i/r is the top of the working tree of a separate repository would create a gitlink in the index, which would appear as a not-quite-initialized submodule to others. We learned to give warnings when this happens. * jk/warn-add-gitlink: t: move "git add submodule" into test blocks add: warn when adding an embedded repository
2017-06-24Merge branch 'sn/reset-doc-typofix'Libravatar Junio C Hamano1-1/+1
Doc update. * sn/reset-doc-typofix: doc: git-reset: fix a trivial typo
2017-06-24Merge branch 'sg/doc-pretty-formats'Libravatar Junio C Hamano1-2/+2
Doc update. * sg/doc-pretty-formats: docs/pretty-formats: stress that %- removes all preceding line-feeds
2017-06-24Merge branch 'ah/doc-gitattributes-empty-index'Libravatar Junio C Hamano1-1/+1
An example in documentation that does not work in multi worktree configuration has been corrected. * ah/doc-gitattributes-empty-index: doc: do not use `rm .git/index` when normalizing line endings
2017-06-22Tenth batch for 2.14Libravatar Junio C Hamano1-0/+28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-22Merge branch 'rs/strbuf-addftime-zZ'Libravatar Junio C Hamano1-1/+2
As there is no portable way to pass timezone information to strftime, some output format from "git log" and friends are impossible to produce. Teach our own strbuf_addftime to replace %z and %Z with caller-supplied values to help working around this. * rs/strbuf-addftime-zZ: date: use localtime() for "-local" time formats t0006: check --date=format zone offsets strbuf: let strbuf_addftime handle %z and %Z itself
2017-06-22Merge branch 'mh/fast-import-raise-default-depth'Libravatar Junio C Hamano1-1/+1
"fast-import" uses a default pack chain depth that is consistent with other parts of the system. * mh/fast-import-raise-default-depth: fast-import: increase the default pack depth to 50
2017-06-22Merge branch 'ah/filter-branch-setup'Libravatar Junio C Hamano1-5/+12
"filter-branch" learned a pseudo filter "--setup" that can be used to define a common function/variable that can be used by other filters. * ah/filter-branch-setup: filter-branch: add [--] to usage filter-branch: add `--setup` step
2017-06-21docs: update 64-bit core.packedGitLimit defaultLibravatar Jeff King1-1/+2
We bumped the default in be4ca2905 (Increase core.packedGitLimit, 2017-04-20) but never adjusted the documentation to match. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-19Ninth batch for 2.14Libravatar Junio C Hamano1-0/+29
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-19Merge branch 'sb/submodule-rm-absorb'Libravatar Junio C Hamano1-4/+5
Doc update to a recently graduated topic. * sb/submodule-rm-absorb: Documentation/git-rm: correct submodule description
2017-06-19Merge branch 'ab/pcre-v2'Libravatar Junio C Hamano1-0/+1
Update "perl-compatible regular expression" support to enable JIT and also allow linking with the newer PCRE v2 library. * ab/pcre-v2: grep: add support for PCRE v2 grep: un-break building with PCRE >= 8.32 without --enable-jit grep: un-break building with PCRE < 8.20 grep: un-break building with PCRE < 8.32 grep: add support for the PCRE v1 JIT API log: add -P as a synonym for --perl-regexp grep: skip pthreads overhead when using one thread grep: don't redundantly compile throwaway patterns under threading
2017-06-18glossary: define 'stash entry'Libravatar Liam Beguin1-0/+4
Signed-off-by: Liam Beguin <liambeguin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-18status: add optional stash count informationLibravatar Liam Beguin2-0/+8
Introduce '--show-stash' and its configuration option 'status.showStash' to allow git-status to show information about currently stashed entries. Signed-off-by: Liam Beguin <liambeguin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-18stash: update documentation to use 'stash entry'Libravatar Liam Beguin5-35/+37
Most of the time, a 'stash entry' is called a 'stash'. Lets try to make this more consistent and use 'stash entry' instead. Signed-off-by: Liam Beguin <liambeguin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-15docs/pretty-formats: stress that %- removes all preceding line-feedsLibravatar SZEDER Gábor1-2/+2
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-15strbuf: let strbuf_addftime handle %z and %Z itselfLibravatar René Scharfe1-1/+2
There is no portable way to pass timezone information to strftime. Add parameters for timezone offset and name to strbuf_addftime and let it handle the timezone-related format specifiers %z and %Z internally. Callers can opt out for %Z by passing NULL as timezone name. %z is always handled internally -- this helps on Windows, where strftime would expand it to a timezone name (same as %Z), in violation of POSIX. Modifiers are not handled, e.g. %Ez is still passed to strftime. Use an empty string as timezone name in show_date (the only current caller) for now because we only have the timezone offset in non-local mode. POSIX allows %Z to resolve to an empty string in case of missing information. Helped-by: Ulrich Mueller <ulm@gentoo.org> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-15doc: git-reset: fix a trivial typoLibravatar Štěpán Němec1-1/+1
Signed-off-by: Štěpán Němec <stepnem@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-15doc: do not use `rm .git/index` when normalizing line endingsLibravatar Andreas Heiduk1-1/+1
When illustrating how to normalize the line endings, the documentation in gitattributes tells the user to `rm .git/index`. This is incorrect for two reasons: - Users shouldn't be instructed to mess around with the internal implementation of Git using raw file system tools like `rm`. - Within a submodule or an additional working tree `.git` is just a file containing a `gitdir: <path>` pointer into the real `.git` directory. Therefore `rm .git/index` does not work. The purpose of the `rm .git/index` instruction is to remove all entries from the index without touching the working tree. The way to do this with Git is to use `read-tree --empty`. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-15add: warn when adding an embedded repositoryLibravatar Jeff King2-0/+10
It's an easy mistake to add a repository inside another repository, like: git clone $url git add . The resulting entry is a gitlink, but there's no matching .gitmodules entry. Trying to use "submodule init" (or clone with --recursive) doesn't do anything useful. Prior to v2.13, such an entry caused git-submodule to barf entirely. In v2.13, the entry is considered "inactive" and quietly ignored. Either way, no clone of your repository can do anything useful with the gitlink without the user manually adding the submodule config. In most cases, the user probably meant to either add a real submodule, or they forgot to put the embedded repository in their .gitignore file. Let's issue a warning when we see this case. There are a few things to note: - the warning will go in the git-add porcelain; anybody wanting to do low-level manipulation of the index is welcome to create whatever funny states they want. - we detect the case by looking for a newly added gitlink; updates via "git add submodule" are perfectly reasonable, and this avoids us having to investigate .gitmodules entirely - there's a command-line option to suppress the warning. This is needed for git-submodule itself (which adds the entry before adding any submodule config), but also provides a mechanism for other scripts doing submodule-like things. We could make this a hard error instead of a warning. However, we do add lots of sub-repos in our test suite. It's not _wrong_ to do so. It just creates a state where users may be surprised. Pointing them in the right direction with a gentle hint is probably the best option. There is a config knob that can disable the (long) hint. But I intentionally omitted a config knob to disable the warning entirely. Whether the warning is sensible or not is generally about context, not about the user's preferences. If there's a tool or workflow that adds gitlinks without matching .gitmodules, it should probably be taught about the new command-line option, rather than blanket-disabling the warning. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-15git-svn: document special options for commit-diffLibravatar Andreas Heiduk1-0/+15
Some options specific for `git svn commit-diff` where not documented so far. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Eric Wong <e@80x24.org>
2017-06-13Sync with maintLibravatar Junio C Hamano1-0/+37
2017-06-13Eighth batch for 2.14Libravatar Junio C Hamano1-14/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-13Merge branch 'sb/submodule-blanket-recursive'Libravatar Junio C Hamano1-0/+5
Many commands learned to pay attention to submodule.recurse configuration. * sb/submodule-blanket-recursive: builtin/fetch.c: respect 'submodule.recurse' option builtin/push.c: respect 'submodule.recurse' option builtin/grep.c: respect 'submodule.recurse' option Introduce 'submodule.recurse' option for worktree manipulators submodule loading: separate code path for .gitmodules and config overlay reset/checkout/read-tree: unify config callback for submodule recursion submodule test invocation: only pass additional arguments submodule recursing: do not write a config variable twice
2017-06-13Prepare for 2.13.2Libravatar Junio C Hamano1-0/+37
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-13Merge branch 'ad/pull-remote-doc' into maintLibravatar Junio C Hamano1-3/+3
Docfix. * ad/pull-remote-doc: docs: fix formatting and grammar
2017-06-13Merge branch 'sl/clean-d-ignored-fix' into maintLibravatar Junio C Hamano1-0/+6
"git clean -d" used to clean directories that has ignored files, even though the command should not lose ignored ones without "-x". "git status --ignored" did not list ignored and untracked files without "-uall". These have been corrected. * sl/clean-d-ignored-fix: clean: teach clean -d to preserve ignored paths dir: expose cmp_name() and check_contains() dir: hide untracked contents of untracked dirs dir: recurse into untracked dirs for ignored files t7061: status --ignored should search untracked dirs t7300: clean -d should skip dirs with ignored files
2017-06-12fast-import: increase the default pack depth to 50Libravatar Mike Hommey1-1/+1
In 618e613a70, 10 years ago, the default for pack depth used for git-pack-objects and git-repack was changed from 10 to 50, while leaving fast-import's default to 10. There doesn't seem to be a reason besides oversight for the change not having happened in fast-import as well. Interestingly, fast-import uses pack.depth when it's set, and the git-config manual says the default for pack.depth is 50. While the git-fast-import manual does say the default depth is 10, the inconsistency is also confusing. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-12filter-branch: add `--setup` stepLibravatar Andreas Heiduk1-5/+12
A `--setup` step in `git filter-branch` makes it much easier to define the initial values of variables used in the real filters. Also sourcing/defining utility functions here instead of `--env-filter` improves performance and minimizes clogging the output in case of errors. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-07doc: describe git svn init --ignore-refsLibravatar Andreas Heiduk1-0/+16
Add the missing documentation for `git svn init --ignore-refs`. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Eric Wong <e@80x24.org>
2017-06-05Sync with v2.13.1Libravatar Junio C Hamano2-510/+45
2017-06-05Seventh batch for 2.14Libravatar Junio C Hamano1-43/+28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-05Merge branch 'ad/pull-remote-doc'Libravatar Junio C Hamano1-3/+3
Docfix. * ad/pull-remote-doc: docs: fix formatting and grammar
2017-06-05Git 2.13.1Libravatar Junio C Hamano2-510/+45
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-05Merge branch 'ah/doc-rev-parse-short-default' into maintLibravatar Junio C Hamano2-6/+7
Doc update. * ah/doc-rev-parse-short-default: doc: rewrite description for rev-parse --short
2017-06-05Merge branch 'ah/doc-filter-branch-export-env' into maintLibravatar Junio C Hamano1-4/+1
Docfix. * ah/doc-filter-branch-export-env: doc: filter-branch does not require re-export of vars
2017-06-05Merge branch 'ah/doc-pretty-format-fix' into maintLibravatar Junio C Hamano1-1/+1
Documentation fix. * ah/doc-pretty-format-fix: Documentation: fix formatting typo in pretty-formats.txt
2017-06-05Merge branch 'ah/doc-interpret-trailers-ifexists' into maintLibravatar Junio C Hamano1-1/+1
Documentation fix. * ah/doc-interpret-trailers-ifexists: Documentation: fix reference to ifExists for interpret-trailers