aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-log.txt
AgeCommit message (Collapse)AuthorFilesLines
2023-10-09diff-merges: introduce '--dd' optionSergey Organov1-1/+1
This option provides a shortcut to request diff with respect to first parent for any kind of commit, universally. It's implemented as pure synonym for "--diff-merges=first-parent --patch". Gives user quick and universal way to see what changes, exactly, were brought to a branch by merges as well as by regular commits. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-09diff-merges: improve --diff-merges documentationSergey Organov1-1/+1
* Put descriptions of convenience shortcuts first, so they are the first things reader observes rather than lengthy detailed stuff. * Get rid of very long line containing all the --diff-merges formats by replacing them with <format>, and putting each supported format on its own line. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-14Merge branch 'ab/dedup-config-and-command-docs'Junio C Hamano1-41/+5
Share the text used to explain configuration variables used by "git <subcmd>" in "git help <subcmd>" with the text from "git help config". * ab/dedup-config-and-command-docs: docs: add CONFIGURATION sections that fuzzy map to built-ins docs: add CONFIGURATION sections that map to a built-in log docs: de-duplicate configuration sections difftool docs: de-duplicate configuration sections notes docs: de-duplicate and combine configuration sections apply docs: de-duplicate configuration sections send-email docs: de-duplicate configuration sections grep docs: de-duplicate configuration sections docs: add and use include template for config/* includes
2022-09-07log docs: de-duplicate configuration sectionsÆvar Arnfjörð Bjarmason1-28/+2
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-07notes docs: de-duplicate and combine configuration sectionsÆvar Arnfjörð Bjarmason1-13/+3
Combine the various "notes" configuration sections spread across Documentation/config/notes.txt and Documentation/git-notes.txt to live in the former, and to be included in the latter. We'll now forward link from "git notes" to the "CONFIGURATION" section below, rather than to "git-config(1)" when discussing configuration variables that are (also) discussed in that section. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-08-05log: create log.initialDecorationSet=allDerrick Stolee1-1/+3
The previous change introduced the --clear-decorations option for users who do not want their decorations limited to a narrow set of ref namespaces. Add a config option that is equivalent to specifying --clear-decorations by default. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-08-05log: add --clear-decorations optionDerrick Stolee1-0/+5
The previous changes introduced a new default ref filter for decorations in the 'git log' command. This can be overridden using --decorate-refs=HEAD and --decorate-refs=refs/, but that is cumbersome for users. Instead, add a --clear-decorations option that resets all previous filters to a blank filter that accepts all refs. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-08-05log: add default decoration filterDerrick Stolee1-2/+5
When a user runs 'git log', they expect a certain set of helpful decorations. This includes: * The HEAD ref * Branches (refs/heads/) * Stashes (refs/stash) * Tags (refs/tags/) * Remote branches (refs/remotes/) * Replace refs (refs/replace/ or $GIT_REPLACE_REF_BASE) Each of these namespaces was selected due to existing test cases that verify these namespaces appear in the decorations. In particular, stashes and replace refs can have custom colors from the color.decorate.<slot> config option. While one test checks for a decoration from notes, it only applies to the tip of refs/notes/commit (or its configured ref name). Notes form their own kind of decoration instead. Modify the expected output for the tests in t4013 that expect this note decoration. There are several tests throughout the codebase that verify that --decorate-refs, --decorate-refs-exclude, and log.excludeDecoration work as designed and the tests continue to pass without intervention. However, there are other refs that are less helpful to show as decoration: * Prefetch refs (refs/prefetch/) * Rebase refs (refs/rebase-merge/ and refs/rebase-apply/) * Bundle refs (refs/bundle/) [!] [!] The bundle refs are part of a parallel series that bootstraps a repo from a bundle file, storing the bundle's refs into the repo's refs/bundle/ namespace. In the case of prefetch refs, 96eaffebbf3d0 (maintenance: set log.excludeDecoration durin prefetch, 2021-01-19) added logic to add refs/prefetch/ to the log.excludeDecoration config option. Additional feedback pointed out that having such a side-effect can be confusing and perhaps not helpful to users. Instead, we should hide these ref namespaces that are being used by Git for internal reasons but are not helpful for the users to see. The way to provide a seamless user experience without setting the config is to modify the default decoration filters to match our expectation of what refs the user actually wants to see. In builtin/log.c, after parsing the --decorate-refs and --decorate-refs-exclude options from the command-line, call set_default_decoration_filter(). This method populates the exclusions from log.excludeDecoration, then checks if the list of pattern modifications are empty. If none are specified, then the default set is restricted to the set of inclusions mentioned earlier (HEAD, branches, etc.). A previous change introduced the ref_namespaces array, which includes all of these currently-used namespaces. The 'decoration' value is non-zero when that namespace is associated with a special coloring and fits into the list of "expected" decorations as described above, which makes the implementation of this filter very simple. Note that the logic in ref_filter_match() in log-tree.c follows this matching pattern: 1. If there are exclusion patterns and the ref matches one, then ignore the decoration. 2. If there are inclusion patterns and the ref matches one, then definitely include the decoration. 3. If there are config-based exclusions from log.excludeDecoration and the ref matches one, then ignore the decoration. With this logic in mind, we need to ensure that we do not populate our new defaults if any of these filters are manually set. Specifically, if a user runs git -c log.excludeDecoration=HEAD log then we expect the HEAD decoration to not appear. If we left the default inclusions in the set, then HEAD would match that inclusion before reaching the config-based exclusions. A potential alternative would be to check the list of default inclusions at the end, after the config-based exclusions. This would still create a behavior change for some uses of --decorate-refs-exclude=<X>, and could be overwritten somewhat with --decorate-refs=refs/ and --decorate-refs=HEAD. However, it no longer becomes possible to include refs outside of the defaults while also excluding some using log.excludeDecoration. Another alternative would be to exclude the known namespaces that are not intended to be shown. This would reduce the visible effect of the change for expert users who use their own custom ref namespaces. The implementation change would be very simple to swap due to our use of ref_namespaces: int i; struct string_list *exclude = decoration_filter->exclude_ref_pattern; /* * No command-line or config options were given, so * populate with sensible defaults. */ for (i = 0; i < NAMESPACE__COUNT; i++) { if (ref_namespaces[i].decoration) continue; string_list_append(exclude, ref_namespaces[i].ref); } The main downside of this approach is that we expect to add new hidden namespaces in the future, and that means that Git versions will be less stable in how they behave as those namespaces are added. It is critical that we provide ways for expert users to disable this behavior change via command-line options and config keys. These changes will be implemented in a future change. Add a test that checks that the defaults are not added when --decorate-refs is specified. We verify this by showing that HEAD is not included as it normally would. Also add a test that shows that the default filter avoids the unwanted decorations from refs/prefetch, refs/rebase-merge, and refs/bundle. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-09doc: use only hyphens as word separators in placeholdersJean-Noël Avila1-4/+4
According to CodingGuidelines, multi-word placeholders should use hyphens as word separators. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-06-08doc/log: correct default for --decorateĐoàn Trần Công Danh1-1/+3
There're two different default options for log --decorate: * Should `--decorate` be given without any arguments, it's default to `short` * Should neither `--decorate` nor `--no-decorate` be given, it's default to the `log.decorate` or `auto`. We documented the former, but not the latter. Let's document them, too. Reported-by: Andy AO <zen96285@gmail.com> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-05Merge branch 'so/log-diff-merge'Junio C Hamano1-39/+7
"git log" learned a new "--diff-merges=<how>" option. * so/log-diff-merge: (32 commits) t4013: add tests for --diff-merges=first-parent doc/git-show: include --diff-merges description doc/rev-list-options: document --first-parent changes merges format doc/diff-generate-patch: mention new --diff-merges option doc/git-log: describe new --diff-merges options diff-merges: add '--diff-merges=1' as synonym for 'first-parent' diff-merges: add old mnemonic counterparts to --diff-merges diff-merges: let new options enable diff without -p diff-merges: do not imply -p for new options diff-merges: implement new values for --diff-merges diff-merges: make -m/-c/--cc explicitly mutually exclusive diff-merges: refactor opt settings into separate functions diff-merges: get rid of now empty diff_merges_init_revs() diff-merges: group diff-merge flags next to each other inside 'rev_info' diff-merges: split 'ignore_merges' field diff-merges: fix -m to properly override -c/--cc t4013: add tests for -m failing to override -c/--cc t4013: support test_expect_failure through ':failure' magic diff-merges: revise revs->diff flag handling diff-merges: handle imply -p on -c/--cc logic for log.c ...
2020-12-21doc/git-show: include --diff-merges descriptionSergey Organov1-50/+1
Move description of --diff-merges option from git-log.txt to diff-options.txt so that it is included in the git-show help. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-21doc/git-log: describe new --diff-merges optionsSergey Organov1-35/+52
Describe all the new --diff-merges options in the git-log.txt and adopt description of originals accordingly. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-11-01doc: log, gitk: move '-L' description to 'line-range-options.txt'Philippe Blain1-14/+1
The description of the '-L' option for `git log` and `gitk` is almost the same, but is repeated in both 'git-log.txt' and 'gitk.txt' (the difference being that 'git-log.txt' lists the option with a space after '-L', while 'gitk.txt' lists it as stuck and notes that `gitk` only understands the stuck form). Reduce duplication by creating a new file, 'line-range-options.txt', and include it in both files. To simplify the presentation, only list the stuck form for both commands, and remove the note about `gitk` only understanding the stuck form. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-17Merge branch 'so/log-diff-merges-opt'Junio C Hamano1-1/+5
Earlier, to countermand the implicit "-m" option when the "--first-parent" option is used with "git log", we added the "--[no-]diff-merges" option in the jk/log-fp-implies-m topic. To leave the door open to allow the "--diff-merges" option to take values that instructs how patches for merge commits should be computed (e.g. "cc"? "-p against first parent?"), redefine "--diff-merges" to take non-optional value, and implement "off" that means the same thing as "--no-diff-merges". * so/log-diff-merges-opt: t/t4013: add test for --diff-merges=off doc/git-log: describe --diff-merges=off revision: change "--diff-merges" option to require parameter
2020-08-17Merge branch 'jk/log-fp-implies-m'Junio C Hamano1-2/+41
"git log --first-parent -p" showed patches only for single-parent commits on the first-parent chain; the "--first-parent" option has been made to imply "-m". Use "--no-diff-merges" to restore the previous behaviour to omit patches for merge commits. * jk/log-fp-implies-m: doc/git-log: clarify handling of merge commit diffs doc/git-log: move "-t" into diff-options list doc/git-log: drop "-r" diff option doc/git-log: move "Diff Formatting" from rev-list-options log: enable "-m" automatically with "--first-parent" revision: add "--no-diff-merges" option to counteract "-m" log: drop "--cc implies -m" logic
2020-08-11doc/git-log: describe --diff-merges=offSergey Organov1-1/+5
Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-29doc/git-log: clarify handling of merge commit diffsJeff King1-0/+7
It can be surprising that git-log doesn't show any diff for merge commits by default. Arguably "--cc" would be a reasonable default, but it's very expensive (which is why we turn it on for "git show" but not for "git log"). Let's at least document the current behavior, including the recent "--first-parent implies -m" case Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-29doc/git-log: move "-t" into diff-options listJeff King1-3/+0
The "-t" option is infrequently used; it doesn't deserve a spot near the top of the options list. Let's push it down into the diff-options include, near the definition of --raw. We'll protect it with a git-log ifdef, since it doesn't make any sense for non-tree diff commands. Note that this means it also shows up in git-show, but that's a good thing; it applies equally well there. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-29doc/git-log: drop "-r" diff optionJeff King1-4/+1
This has been the default since 170c04383b (Porcelain level "log" family should recurse when diffing., 2007-08-27). There's not even a way to turn it off, so you'd never even want "-r" to override that. It's not the default for plumbing like diff-tree, of course, but the option is documented separately there. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-29doc/git-log: move "Diff Formatting" from rev-list-optionsJeff King1-2/+40
Our rev-list-options.txt include has a "Diff Formatting" section, but it is ifndef'd out for all manpages except git-log. And a few bits of the text are rather out of date. We say "some of these options are specific to git-rev-list". That's obviously silly since we (even before this patch) show the content only for git-log. But moreover, it's not true; each of the listed options is meaningful for other diff commands. We also say "...however other diff options may be given. See git-diff-files for more options." But there's no need to do so; git-log already has a "Common Diff Options" section which includes diff-options.txt. So let's move these options over to git-log and put them with the other diff options, giving a single "diff" section for the git-log documentation. We'll call it "Diff Formatting" but use the all-caps top-level header to match its sibling sections. And we'll rewrite the section intro to remove the useless bits and give a more generic overview of the section which can be later extended. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-08git-log.txt: include rev-list-description.txtPhilippe Blain1-0/+3
The `git log` synopsis mentions `<revision range>`, and the description of this option links to gitrevisions(7), but a nice explanation of how a revision range can be constructed from individual commits, optionnally prefixed with `^`, also exists in `rev-list-description.txt`. Include this description in the man page for `git log`. Add Asciidoc 'ifdef's to `rev-list-description.txt` so that either `git rev-list` or `git log` appears in the respective man pages. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-08git-log.txt: add links to 'rev-list' and 'diff' docsPhilippe Blain1-2/+2
Add links to the documentation for `git rev-list` and `git diff` instead of simply mentioning them, to make it easier for readers to reach these documentation pages. Let's link to `git diff` as this is the porcelain command, and the rest of the family (`diff-index`, `diff-tree` and `diff-files`) are mentioned in the "Raw output format" section of the `git diff` documentation. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-04-28Merge branch 'ds/log-exclude-decoration-config'Junio C Hamano1-1/+4
The "--decorate-refs" and "--decorate-refs-exclude" options "git log" takes have learned a companion configuration variable log.excludeDecoration that sits at the lowest priority in the family. * ds/log-exclude-decoration-config: log: add log.excludeDecoration config option log-tree: make ref_filter_match() a helper method
2020-04-16log: add log.excludeDecoration config optionDerrick Stolee1-1/+4
In 'git log', the --decorate-refs-exclude option appends a pattern to a string_list. This list is used to prevent showing some refs in the decoration output, or even by --simplify-by-decoration. Users may want to use their refs space to store utility refs that should not appear in the decoration output. For example, Scalar [1] runs a background fetch but places the "new" refs inside the refs/scalar/hidden/<remote>/* refspace instead of refs/<remote>/* to avoid updating remote refs when the user is not looking. However, these "hidden" refs appear during regular 'git log' queries. A similar idea to use "hidden" refs is under consideration for core Git [2]. Add the 'log.excludeDecoration' config option so users can exclude some refs from decorations by default instead of needing to use --decorate-refs-exclude manually. The config value is multi-valued much like the command-line option. The documentation is careful to point out that the config value can be overridden by the --decorate-refs option, even though --decorate-refs-exclude would always "win" over --decorate-refs. Since the 'log.excludeDecoration' takes lower precedence to --decorate-refs, and --decorate-refs-exclude takes higher precedence, the struct decoration_filter needed another field. This led also to new logic in load_ref_decorations() and ref_filter_match(). There are several tests in t4202-log.sh that test the --decorate-refs-(include|exclude) options, so these are extended. Since the expected output is already stored as a file, most tests could simply replace a "--decorate-refs-exclude" option with an in-line config setting. Other tests involve the precedence of the config option compared to command-line options and needed more modification. [1] https://github.com/microsoft/scalar [2] https://lore.kernel.org/git/77b1da5d3063a2404cd750adfe3bb8be9b6c497d.1585946894.git.gitgitgadget@gmail.com/ Helped-by: Junio C Hamano <gister@pobox.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-16log: give --[no-]use-mailmap a more sensible synonym --[no-]mailmapJunio C Hamano1-0/+1
The option name "--use-mailmap" looks OK, but it becomes awkward when you have to negate it, i.e. "--no-use-mailmap". I, perhaps with many other users, always try "--no-mailmap" and become unhappy to see it fail. Add an alias "--[no-]mailmap" to remedy this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-01-06Merge branch 'pb/clarify-line-log-doc'Junio C Hamano1-2/+6
Doc update. * pb/clarify-line-log-doc: doc: log, gitk: line-log arguments must exist in starting revision doc: log, gitk: document accepted line-log diff formats
2019-12-26doc: log, gitk: line-log arguments must exist in starting revisionPhilippe Blain1-1/+2
The line number, regex or offset parameters <start> and <end> in `git log -L <start>,<end>:<file>`, or the function name regex in `git log -L :<funcname>:<file>` must exist in the starting revision, or else the command exits with a fatal error. This is not obvious in the documentation, so add a note to that effect. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-12-26doc: log, gitk: document accepted line-log diff formatsPhilippe Blain1-1/+4
Currently the line-log functionality (git log -L) only supports displaying patch output (`-p | --patch`, its default behavior) and suppressing it (`-s | --no-patch`). A check was added in the code to that effect in 5314efaea (line-log: detect unsupported formats, 2019-03-10) but the documentation was not updated. Explicitly mention that `-L` implies `-p`, that patch output can be suppressed using `-s`, and that all other diff formats are not allowed. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-07-15documentation: mention --no-use-mailmap and log.mailmap false settingAriadne Conill1-1/+1
The log.mailmap setting may be explicitly set to false, which disables the mailmap feature implicity. In practice, doing so is equivalent to always using the previously undocumented --no-use-mailmap option on the command line. Accordingly, we document both the existence of --no-use-mailmap as well as briefly discuss the equivalence of it to log.mailmap=False. Signed-off-by: Ariadne Conill <ariadne@dereferenced.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-22Add 'human' date format documentationStephen P. Smith1-0/+4
Display date and time information in a format similar to how people write dates in other contexts. If the year isn't specified then, the reader infers the date is given is in the current year. By not displaying the redundant information, the reader concentrates on the information that is different. The patch reports relative dates based on information inferred from the date on the machine running the git command at the time the command is executed. While the format is more useful to humans by dropping inferred information, there is nothing that makes it actually human. If the 'relative' date format wasn't already implemented then using 'relative' would have been appropriate. Signed-off-by: Stephen P. Smith <ischis2@cox.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-18git-[short]log.txt: unify quoted standalone --Martin Ågren1-2/+2
In git-log.txt, we have an instance of \--, which is known to sometimes render badly. This one is even worse than normal though, since ``\-- '' (with or without that trailing space) appears to be entirely broken, both in HTML and manpages, both with AsciiDoc (version 8.6.9) and Asciidoctor (version 1.5.4). Further down in git-log.txt we have a ``--'', which renders good. In git-shortlog.txt, we use "\-- " (including the quotes and the space), which happens to look fairly good. I failed to find any other similar instances. So all in all, we quote a double-dash in three different places and do it differently each time, with various degrees of success. Switch all of these to `--`. This sets the double-dash in monospace and matches what we usually do with example command line usages and options. Note that we drop the trailing space as well, since `-- ` does not render well. These should still be clear enough since just a few lines above each instance, the space is clearly visible in a longer context. Signed-off-by: Martin Ågren <martin.agren@gmail.com>
2018-04-18doc: convert [\--] to [--]Martin Ågren1-2/+2
Commit 1c262bb7b (doc: convert \--option to --option, 2015-05-13) explains that we used to need to write \--option to play well with older versions of AsciiDoc, but that we do not support such versions anymore anyway, and that Asciidoctor literally renders \--. With [\--], which is used to denote the optional separator between revisions and paths, Asciidoctor renders the backslash literally. Change all [\--] to [--]. This changes nothing for AsciiDoc version 8.6.9, but is an improvement for Asciidoctor version 1.5.4. We use double-dashes in several list entries (\--::). In my testing, it appears that we do need to use the backslash there, so leave those. Signed-off-by: Martin Ågren <martin.agren@gmail.com>
2017-11-22log: add option to choose which refs to decorateRafael Ascensão1-0/+7
When `log --decorate` is used, git will decorate commits with all available refs. While in most cases this may give the desired effect, under some conditions it can lead to excessively verbose output. Introduce two command line options, `--decorate-refs=<pattern>` and `--decorate-refs-exclude=<pattern>` to allow the user to select which refs are used in decoration. When "--decorate-refs=<pattern>" is given, only the refs that match the pattern are used in decoration. The refs that match the pattern when "--decorate-refs-exclude=<pattern>" is given, are never used in decoration. These options follow the same convention for mixing negative and positive patterns across the system, assuming that the inclusive default is to match all refs available. (1) if there is no positive pattern given, pretend as if an inclusive default positive pattern was given; (2) for each candidate, reject it if it matches no positive pattern, or if it matches any one of the negative patterns. The rules for what is considered a match are slightly different from the rules used elsewhere. Commands like `log --glob` assume a trailing '/*' when glob chars are not present in the pattern. This makes it difficult to specify a single ref. On the other hand, commands like `describe --match --all` allow specifying exact refs, but do not have the convenience of allowing "shorthand refs" like 'refs/heads' or 'heads' to refer to 'refs/heads/*'. The commands introduced in this patch consider a match if: (a) the pattern contains globs chars, and regular pattern matching returns a match. (b) the pattern does not contain glob chars, and ref '<pattern>' exists, or if ref exists under '<pattern>/' This allows both behaviours (allowing single refs and shorthand refs) yet remaining compatible with existent commands. Helped-by: Kevin Daudt <me@ikke.info> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Rafael Ascensão <rafa.almas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-11Merge branch 'mj/log-show-signature-conf'Junio C Hamano1-0/+4
"git log" learns log.showSignature configuration variable, and a command line option "--no-show-signature" to countermand it. * mj/log-show-signature-conf: log: add log.showSignature configuration variable log: add "--no-show-signature" command line option t4202: refactor test
2016-06-27Merge branch 'tr/doc-tt'Junio C Hamano1-2/+2
The documentation set has been updated so that literal commands, configuration variables and environment variables are consistently typeset in fixed-width font and bold in manpages. * tr/doc-tt: doc: change configuration variables format doc: more consistency in environment variables format doc: change environment variables format doc: clearer rule about formatting literals
2016-06-24log: add log.showSignature configuration variableMehul Jain1-0/+4
Users may want to always use "--show-signature" while using git-log and related commands. When log.showSignature is set to true, git-log and related commands will behave as if "--show-signature" was given to them. Note that this config variable is meant to affect git-log, git-show, git-whatchanged and git-reflog. Other commands like git-format-patch, git-rev-list are not to be affected by this config variable. Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-08doc: change environment variables formatTom Russello1-2/+2
This change GIT_* variables that where in italic style to monospaced font according to the guideline. It was obtained with perl -pi -e "s/\'(GIT_.*?)\'/\`\1\`/g" *.txt One of the main purposes is to stick to the CodingGuidelines as possible so that people writting new documentation by mimicking the existing are more likely to have it right (even if they didn't read the CodingGuidelines). Signed-off-by: Tom Russello <tom.russello@grenoble-inp.org> Signed-off-by: Erwan Mathoniere <erwan.mathoniere@grenoble-inp.org> Signed-off-by: Samuel Groot <samuel.groot@grenoble-inp.org> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-29Merge branch 'rj/log-decorate-auto'Junio C Hamano1-3/+5
We forgot to add "git log --decorate=auto" to documentation when we added the feature back in v2.1.0 timeframe. * rj/log-decorate-auto: log: document the --decorate=auto option
2016-05-27log: document the --decorate=auto optionRamsay Jones1-3/+5
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-07log: Update log.follow doc and add to config.txtEric N. Vander Weele1-4/+4
Documentation/config.txt does not include the documentation for log.follow that is in Documentation/git-log.txt. This commit adds the log.follow documentation to config.txt and also updates the wording to be consistent with the format that is followed by other boolean configuration variables. Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com> Acked-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-09log: add "log.follow" configuration variableDavid Turner1-0/+6
People who work on projects with mostly linear history with frequent whole file renames may want to always use "git log --follow" when inspecting the life of the content that live in a single path. Teach the command to behave as if "--follow" was given from the command line when log.follow configuration variable is set *and* there is one (and only one) path on the command line. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-05Merge branch 'mm/usage-log-l-can-take-regex'Junio C Hamano1-2/+2
Documentation fix. * mm/usage-log-l-can-take-regex: log -L: improve error message on malformed argument Documentation: change -L:<regex> to -L:<funcname>
2015-04-20Documentation: change -L:<regex> to -L:<funcname>Matthieu Moy1-2/+2
The old wording was somehow implying that <start> and <end> were not regular expressions. Also, the common case is to use a plain function name here so <funcname> makes sense (the fact that it is a regular expression is documented in line-range-format.txt). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-13*config.txt: stick to camelCase naming conventionNguyễn Thái Ngọc Duy1-1/+1
This should improve readability. Compare "thislongname" and "thisLongName". The following keys are left in unchanged. We can decide what to do with them later. - am.keepcr - core.autocrlf .safecrlf .trustctime - diff.dirstat .noprefix - gitcvs.usecrlfattr - gui.blamehistoryctx .trustmtime - pull.twohead - receive.autogc - sendemail.signedoffbycc .smtpsslcertpath .suppresscc Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-03Merge branch 'jj/log-doc'Junio C Hamano1-26/+25
Mark-up fixes. * jj/log-doc: Documentation/git-log.txt: mark-up fix and minor rephasing Documentation/git-log: update "--log-size" description
2013-11-13Documentation/git-log.txt: mark-up fix and minor rephasingJason St. John1-23/+23
- typeset options, commands, and paths in monospace; - typeset references to sections with emphasis; - replace some double quotes with proper AsciiDoc quotes (e.g. ``foo''); - use title case when referring to section headings. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-13Documentation/git-log: update "--log-size" descriptionJason St. John1-5/+5
"--log-size" was added in commit 9fa3465, and the commit message contained a satisfactory explanation; however, the man page entry for it did not describe the actual output format, what the output meant and what the option was meant to be used for. Helped-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06line-range-format.txt: clarify -L:regex usage formEric Sunshine1-2/+0
blame/log documentation describes -L option as: -L<start>,<end> -L:<regex> <start> and <end> can take one of these forms: * number * /regex/ * +offset or -offset * :regex which is incorrect and confusing since :regex is not one of the valid forms of <start> or <end>; in fact, it must be -L's lone argument. Clarify by discussing :<regex> at the same indentation level as "<start> and <end>...": -L<start>,<end> -L:<regex> <start> and <end> can take one of these forms: * number * /regex/ * +offset or -offset If :<regex> is given in place of <start> and <end> ... Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-06git-log.txt: place each -L option variation on its own lineEric Sunshine1-1/+2
Standard practice in Git documentation is for each variation of an option (such as: -p / --porcelain) to be placed on its own line in the OPTIONS table. The -L option does not follow suit. It cuddles "-L <start>,<end>:<file>" and "-L :<regex>:<file>", separated by a comma. This is inconsistent and potentially confusing since the comma separating them is typeset the same as the comma in "<start>,<end>". Fix this by placing each variation on its own line. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22Merge branch 'mm/diff-no-patch-synonym-to-s'Junio C Hamano1-4/+4
"git show -s" was less discoverable than it should be. * mm/diff-no-patch-synonym-to-s: Documentation/git-log.txt: capitalize section names Documentation: move description of -s, --no-patch to diff-options.txt Documentation/git-show.txt: include common diff options, like git-log.txt diff: allow --patch & cie to override -s/--no-patch diff: allow --no-patch as synonym for -s t4000-diff-format.sh: modernize style
2013-07-17Documentation/git-log.txt: capitalize section namesMatthieu Moy1-4/+4
This is the convention in most other files and even at the beginning of git-log.txt Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17git-log.txt: fix typesetting of example "git-log -L" invocationEric Sunshine1-1/+1
All surrounding examples are typeset as monospaced text. Follow suit. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Acked-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-26Merge branch 'ph/builtin-srcs-are-in-subdir-these-days'Junio C Hamano1-2/+2
* ph/builtin-srcs-are-in-subdir-these-days: fix "builtin-*" references to be "builtin/*"
2013-06-18fix "builtin-*" references to be "builtin/*"Phil Hord1-2/+2
Documentation and some comments still refer to files in builtin/ as 'builtin-*.[cho]'. Update these to show the correct location. Signed-off-by: Phil Hord <hordp@cisco.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Assisted-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-02Merge branch 'tr/line-log'Junio C Hamano1-0/+18
* tr/line-log: git-log(1): remove --full-line-diff description line-log: fix documentation formatting log -L: improve comments in process_all_files() log -L: store the path instead of a diff_filespec log -L: test merge of parallel modify/rename t4211: pass -M to 'git log -M -L...' test log -L: fix overlapping input ranges log -L: check range set invariants when we look it up Speed up log -L... -M log -L: :pattern:file syntax to find by funcname Implement line-history search (git log -L) Export rewrite_parents() for 'log -L' Refactor parse_loc
2013-04-22git-log(1): remove --full-line-diff descriptionThomas Rast1-4/+0
This option is a remnant of an earlier log -L version, and not currently implemented. Remove it until (if at all) it is implemented again. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-21git-log.txt: rewrite note on why "--" may be requiredRamkumar Ramachandra1-2/+2
In its current form, the note talks about separating options from "branch names" and "refnames" in the same sentence. This is entirely inaccurate, as <revision range> need not be a set of branch names or ref names. Rewrite it to use the word "revision range", to be consistent with the SYNOPSIS. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-21git-log.txt: generalize <since>..<until>Ramkumar Ramachandra1-7/+9
'<since>..<until>' is misleading, as there are many other forms that 'git log' can accept as an argument. Replace it with <revision range>, referring to the section "Specifying Ranges" in revisions.txt, and rewrite the section appropriately. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-21git-log.txt: order OPTIONS properly; move <since>..<until>Ramkumar Ramachandra1-7/+7
The OPTIONS section lists <since>..<until> as the first item, but this is inconsistent with the ordering in SYNOPSIS. Move it down until it appears just before [[--] <path>...]. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-21line-log: fix documentation formattingJunio C Hamano1-3/+2
The second paragraph of the added description for the -L option "<start> and <end> can take one of these forms:", and the list of forms that follow the headline, were indented one level too short, due to the missing "+" to signal that the next paragraph continues the previous one. Also "You can specify this option more than once" is about the -L option, not about its various forms of starting and ending points. Move it to the end of the main text. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-28log -L: :pattern:file syntax to find by funcnameThomas Rast1-5/+6
This new syntax finds a funcname matching /pattern/, and then takes from there up to (but not including) the next funcname. So you can say git log -L:main:main.c and it will dig up the main() function and show its line-log, provided there are no other funcnames matching 'main'. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-28Implement line-history search (git log -L)Thomas Rast1-0/+22
This is a rewrite of much of Bo's work, mainly in an effort to split it into smaller, easier to understand routines. The algorithm is built around the struct range_set, which encodes a series of line ranges as intervals [a,b). This is used in two contexts: * A set of lines we are tracking (which will change as we dig through history). * To encode diffs, as pairs of ranges. The main routine is range_set_map_across_diff(). It processes the diff between a commit C and some parent P. It determines which diff hunks are relevant to the ranges tracked in C, and computes the new ranges for P. The algorithm is then simply to process history in topological order from newest to oldest, computing ranges and (partial) diffs. At branch points, we need to merge the ranges we are watching. We will find that many commits do not affect the chosen ranges, and mark them TREESAME (in addition to those already filtered by pathspec limiting). Another pass of history simplification then gets rid of such commits. This is wired as an extra filtering pass in the log machinery. This currently only reduces code duplication, but should allow for other simplifications and options to be used. Finally, we hook a diff printer into the output chain. Ideally we would wire directly into the diff logic, to optionally use features like word diff. However, that will require some major reworking of the diff chain, so we completely replace the output with our own diff for now. As this was a GSoC project, and has quite some history by now, many people have helped. In no particular order, thanks go to Jakub Narebski <jnareb@gmail.com> Jens Lehmann <Jens.Lehmann@web.de> Jonathan Nieder <jrnieder@gmail.com> Junio C Hamano <gitster@pobox.com> Ramsay Jones <ramsay@ramsay1.demon.co.uk> Will Palmer <wmpalmer@gmail.com> Apologies to everyone I forgot. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01Documentation: the name of the system is 'Git', not 'git'Thomas Ackermann1-1/+1
Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-20Merge branch 'ap/log-mailmap'Junio C Hamano1-0/+5
Teach commands in the "log" family to optionally pay attention to the mailmap. * ap/log-mailmap: log --use-mailmap: optimize for cases without --author/--committer search log: add log.mailmap configuration option log: grep author/committer using mailmap test: add test for --use-mailmap option log: add --use-mailmap option pretty: use mailmap to display username and email mailmap: add mailmap structure to rev_info and pp mailmap: simplify map_user() interface mailmap: remove email copy and length limitation Use split_ident_line to parse author and committer string-list: allow case-insensitive string list
2013-01-10log: add --use-mailmap optionAntoine Pelisse1-0/+5
Add the --use-mailmap option to log commands. It allows to display names from mailmap file when displaying logs, whatever the format used. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13mailmap: fix some documentation loose-ends for mailmap.blobJeff King1-1/+1
Anywhere we mention mailmap.file, it is probably worth mentioning mailmap.blob, as well. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-06doc: move rev-list option -<n> from git-log.txt to rev-list-options.txtNguyễn Thái Ngọc Duy1-4/+2
rev-list-options.txt is included in git-rev-list.txt. This makes sure rev-list man page also shows that, and at one place, together with equivalent options -n and --max-count. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-26docs: stop using asciidoc no-inline-literalJeff King1-1/+1
In asciidoc 7, backticks like `foo` produced a typographic effect, but did not otherwise affect the syntax. In asciidoc 8, backticks introduce an "inline literal" inside which markup is not interpreted. To keep compatibility with existing documents, asciidoc 8 has a "no-inline-literal" attribute to keep the old behavior. We enabled this so that the documentation could be built on either version. It has been several years now, and asciidoc 7 is no longer in wide use. We can now decide whether or not we want inline literals on their own merits, which are: 1. The source is much easier to read when the literal contains punctuation. You can use `master~1` instead of `master{tilde}1`. 2. They are less error-prone. Because of point (1), we tend to make mistakes and forget the extra layer of quoting. This patch removes the no-inline-literal attribute from the Makefile and converts every use of backticks in the documentation to an inline literal (they must be cleaned up, or the example above would literally show "{tilde}" in the output). Problematic sites were found by grepping for '`.*[{\\]' and examined and fixed manually. The results were then verified by comparing the output of "html2text" on the set of generated html pages. Doing so revealed that in addition to making the source more readable, this patch fixes several formatting bugs: - HTML rendering used the ellipsis character instead of literal "..." in code examples (like "git log A...B") - some code examples used the right-arrow character instead of '->' because they failed to quote - api-config.txt did not quote tilde, and the resulting HTML contained a bogus snippet like: <tt><sub></tt> foo <tt></sub>bar</tt> which caused some parsers to choke and omit whole sections of the page. - git-commit.txt confused ``foo`` (backticks inside a literal) with ``foo'' (matched double-quotes) - mentions of `A U Thor <author@example.com>` used to erroneously auto-generate a mailto footnote for author@example.com - the description of --word-diff=plain incorrectly showed the output as "[-removed-] and {added}", not "{+added+}". - using "prime" notation like: commit `C` and its replacement `C'` confused asciidoc into thinking that everything between the first backtick and the final apostrophe were meant to be inside matched quotes - asciidoc got confused by the escaping of some of our asterisks. In particular, `credential.\*` and `credential.<url>.\*` properly escaped the asterisk in the first case, but literally passed through the backslash in the second case. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-30Merge branch 'maint'Junio C Hamano1-4/+7
* maint: Documentation: clarify effects of -- <path> arguments
2011-08-30Documentation: clarify effects of -- <path> argumentsThomas Rast1-4/+7
'git log -- <path>' does not "show commits that affect the specified paths" in a literal sense unless --full-history is given (for example, a file that only existed on a side branch will turn up no commits at all!). Reword it to specify the actual intent of the filtering, and point to the "History Simplification" section. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04docs: put listed example commands in backticksJeff King1-8/+8
Many examples of git command invocation are given in asciidoc listing blocks, which makes them monospaced and avoids further interpretation of special characters. Some manpages make a list of examples, like: git foo:: Run git foo. git foo -q:: Use the "-q" option. to quickly show many variants. However, they can sometimes be hard to read, because they are shown in a proportional-width font (so, for example, seeing the difference between "-- foo" and "--foo" can be difficult). This patch puts all such examples into backticks, which gives the equivalent formatting to a listing block (i.e., monospaced and without character interpretation). As a bonus, this also fixes an example in the git-push manpage, in which "git push origin :::" was accidentally considered a newly-indented list, and not a list item with "git push origin :" in it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-06Documentation: use [verse] for SYNOPSIS sectionsMartin von Zweigbergk1-0/+1
The SYNOPSIS sections of most commands that span several lines already use [verse] to retain line breaks. Most commands that don't span several lines seem not to use [verse]. In the HTML output, [verse] does not only preserve line breaks, but also makes the section indented, which causes a slight inconsistency between commands that use [verse] and those that don't. Use [verse] in all SYNOPSIS sections for consistency. Also remove the blank lines from git-fetch.txt and git-rebase.txt to align with the other man pages. In the case of git-rebase.txt, which already uses [verse], the blank line makes the [verse] not apply to the last line, so removing the blank line also makes the formatting within the document more consistent. While at it, add single quotes to 'git cvsimport' for consistency with other commands. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-30log/pretty-options: Document --[no-]notes and deprecate old notes optionsJohan Herland1-2/+2
Document the behavior or the new --notes, --notes=<ref> and --no-notes options, and list --show-notes[=<ref>] and --[no-]standard-notes options as deprecated. Signed-off-by: Johan Herland <johan@herland.net> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-19Merge branch 'mg/rev-list-n-reverse-doc'Junio C Hamano1-5/+6
* mg/rev-list-n-reverse-doc: git-log.txt,rev-list-options.txt: put option blocks in proper order git-log.txt,rev-list-options.txt: -n/--max-count is commit limiting
2011-03-11doc: drop author/documentation sections from most pagesJeff King1-8/+0
The point of these sections is generally to: 1. Give credit where it is due. 2. Give the reader an idea of where to ask questions or file bug reports. But they don't do a good job of either case. For (1), they are out of date and incomplete. A much more accurate answer can be gotten through shortlog or blame. For (2), the correct contact point is generally git@vger, and even if you wanted to cc the contact point, the out-of-date and incomplete fields mean you're likely sending to somebody useless. So let's drop the fields entirely from all manpages except git(1) itself. We already point people to the mailing list for bug reports there, and we can update the Authors section to give credit to the major contributors and point to shortlog and blame for more information. Each page has a "This is part of git" footer, so people can follow that to the main git manpage.
2011-03-09git-log.txt,rev-list-options.txt: put option blocks in proper orderMichael J Gruber1-5/+5
Match the order of the description to the one in which they get applied: commit limiting commit ordering commit formatting diff options Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-08git-log.txt,rev-list-options.txt: -n/--max-count is commit limitingMichael J Gruber1-0/+1
They are applied after commit ordering and formatting options, in particular --reverse. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-03Replace "remote tracking" with "remote-tracking"Matthieu Moy1-1/+1
"remote-tracking" branch makes it explicit that the branch is "tracking a remote", as opposed to "remote, and tracking something". See discussion in e.g. http://mid.gmane.org/8835ADF9-45E5-4A26-9F7F-A72ECC065BB2@gmail.com for more details. This patch is a straightforward application of perl -pi -e 's/remote tracking branch/remote-tracking branch/' except in the RelNotes directory. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13Documentation: gitrevisions is in section 7Jonathan Nieder1-1/+1
Fix references to gitrevisions(1) in the manual pages and HTML documentation. In practice, this will not matter much unless someone tries to use a hard copy of the git reference manual. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Documentation/git-log: Clarify --full-diffMichael J Gruber1-0/+3
The current description gives the impression that "--full-diff" affects "log -p" only. Make it clearer that it affects all diff-based output types. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-15Merge branch 'eb/doc-log-manpage'Junio C Hamano1-6/+9
* eb/doc-log-manpage: Reorganize `git-log' man page to clarify common diff options.
2010-07-08Reorganize `git-log' man page to clarify common diff options.Eli Barzilay1-6/+9
This will reduce considerably the common confusion where people miss the `--follow' option, and wonder why `-M'/`-C' is not working. * Move the diff options include to after the log-specific flags, and add a "Common diff options" subtitle before them. (These options apply only when patches are shown, which is not a common use case among newbies, so having them first is confusing.) * Move the `--follow' description to the top of the listed options. The options before that seem less important: `--full-diff' applies only when patches are shown, `--source' and `--decorate' are less useful with many common commit specifications. * Clarify that `--follow' works only for a single path argument. Signed-off-by: Eli Barzilay <eli@barzilay.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-05Documentation: link to gitrevisions rather than git-rev-parseMichael J Gruber1-2/+1
Currently, whenever we need documentation for revisions and ranges, we link to the git-rev-parse man page, i.e. a plumbing man page, which has this along with the documentation of all rev-parse modes. Link to the new gitrevisions man page instead in all cases except - when the actual git-rev-parse command is referred to or - in very technical context (git-send-pack). Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-13Merge branch 'jn/notes-doc'Junio C Hamano1-0/+42
* jn/notes-doc: Documentation/notes: nitpicks Documentation/notes: clean up description of rewriting configuration Documentation/notes: simplify treatment of default display refs Documentation/log: add a CONFIGURATION section Documentation/notes: simplify treatment of default notes ref Documentation/notes: add configuration section Documentation/notes: describe content of notes blobs Documentation/notes: document format of notes trees
2010-05-21Merge branch 'by/log-follow'Junio C Hamano1-1/+1
* by/log-follow: tests: rename duplicate t4205 Make git log --follow find copies among unmodified files. Make diffcore_std only can run once before a diff_flush Add a macro DIFF_QUEUE_CLEAR.
2010-05-08Merge branch 'sd/log-decorate'Junio C Hamano1-1/+2
* sd/log-decorate: log.decorate: only ignore it under "log --pretty=raw" script with rev-list instead of log log --pretty/--oneline: ignore log.decorate log.decorate: usability fixes Add `log.decorate' configuration variable. git_config_maybe_bool() Conflicts: builtin/log.c
2010-05-08Documentation/log: add a CONFIGURATION sectionJonathan Nieder1-0/+42
Add a configuration section summarizing variables that affect the log family of commands. Cc: Thomas Rast <trast@student.ethz.ch> Cc: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-07Make git log --follow find copies among unmodified files.Bo Yang1-1/+1
'git log --follow <path>' don't track copies from unmodified files, and this patch fix it. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17log.decorate: usability fixesJunio C Hamano1-1/+2
The configuration is meant to suppliment --decorate command line option that can be used as a boolean to turn the feature on, so it is natural to expect [log] decorate decorate = yes to work. The original commit would segfault with the first one, and would not understand the second one. Once a user has this configuration in ~/.gitconfig, there needs to be a way to override it from the command line. Add --no-decorate option to log family and also allow --decorate=no to mean the same thing. Since we allow setting log.decorate to 'true', the command line also should accept --decorate=yes and behave accordingly. New tests in t4202 are designed to exercise the interaction between the configuration variable and the command line option that overrides it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-12git log -p -m: document -m and honor --first-parentPetr Baudis1-0/+9
git log -p -m is used to show one merge entry per parent, with an appropriate diff; this can be useful when examining histories where full set of changes introduced by a merged branch is interesting, not only the conflicts. This patch properly documents the -m switch, which has so far been mentioned only as a fairly special diff-tree flag. It also makes the code show full patch entry only for the first parent when --first-parent is used. Thus: git log -p -m --first-parent will show the history from the "main branch perspective", while also including full diff of changes introduced by other merged in branches. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-22Merge branch 'il/rev-glob'Junio C Hamano1-0/+11
* il/rev-glob: Documentation: improve description of --glob=pattern and friends rev-parse --branches/--tags/--remotes=pattern rev-parse --glob
2010-01-20rev-parse --branches/--tags/--remotes=patternIlari Liusvaara1-2/+2
Since local branch, tags and remote tracking branch namespaces are most often used, add shortcut notations for globbing those in manner similar to --glob option. With this, one can express the "what I have but origin doesn't?" as: 'git log --branches --not --remotes=origin' Original-idea-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-20rev-parse --globIlari Liusvaara1-0/+11
Add --glob=<glob-pattern> option to rev-parse and everything that accepts its options. This option matches all refs that match given shell glob pattern (complete with some DWIM logic). Example: 'git log --branches --not --glob=remotes/origin' To show what you have that origin doesn't. Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-10Documentation: spell 'git cmd' without dash throughoutThomas Rast1-2/+2
The documentation was quite inconsistent when spelling 'git cmd' if it only refers to the program, not to some specific invocation syntax: both 'git-cmd' and 'git cmd' spellings exist. The current trend goes towards dashless forms, and there is precedent in 647ac70 (git-svn.txt: stop using dash-form of commands., 2009-07-07) to actively eliminate the dashed variants. Replace 'git-cmd' with 'git cmd' throughout, except where git-shell, git-cvsserver, git-upload-pack, git-receive-pack, and git-upload-archive are concerned, because those really live in the $PATH.
2009-08-18git-log: allow --decorate[=short|full]Lars Hjemli1-2/+6
Commit de435ac0 changed the behavior of --decorate from printing the full ref (e.g., "refs/heads/master") to a shorter, more human-readable version (e.g., just "master"). While this is nice for human readers, external tools using the output from "git log" may prefer the full version. This patch introduces an extension to --decorate to allow the caller to specify either the short or the full versions. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11Document "git log --source"Nanako Shiraishi1-0/+4
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-01Improve git-log documentation wrt file filtersmartin f. krafft1-3/+6
The need for "--" in the git-log synopsis was previously unclear and confusing. This patch makes it a little clearer. Thanks to hyy <yiyihu@gmail.com> for his help. [sp: Changed -- to \-- per prior commit e1ccf53.] Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-30Make the DESCRIPTION match <x>... items in the SYNOPSISAbhijit Menon-Sen1-3/+3
When the SYNOPSIS says e.g. "<path>...", it is nice if the DESCRIPTION also mentions "<path>..." and says the specified "paths" (note plural) are used for $whatever. This fixes the obvious mismatches. Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-27Clarify that "git log x.c y.h" lists commits that touch either fileAbhijit Menon-Sen1-1/+1
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05manpages: italicize git command names (which were in teletype font)Jonathan Nieder1-2/+2
The names of git commands are not meant to be entered at the commandline; they are just names. So we render them in italics, as is usual for command names in manpages. Using doit () { perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }' } for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \ merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt do doit <"$i" >"$i+" && mv "$i+" "$i" done git diff . Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-01Documentation formatting and cleanupJonathan Nieder1-2/+2
Following what appears to be the predominant style, format names of commands and commandlines both as `teletype text`. While we're at it, add articles ("a" and "the") in some places, italicize the name of the command in the manual page synopsis line, and add a comma or two where it seems appropriate. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-01Documentation: be consistent about "git-" versus "git "Jonathan Nieder1-1/+1
Since the git-* commands are not installed in $(bindir), using "git-command <parameters>" in examples in the documentation is not a good idea. On the other hand, it is nice to be able to refer to each command using one hyphenated word. (There is no escaping it, anyway: man page names cannot have spaces in them.) This patch retains the dash in naming an operation, command, program, process, or action. Complete command lines that can be entered at a shell (i.e., without options omitted) are made to use the dashless form. The changes consist only of replacing some spaces with hyphens and vice versa. After a "s/ /-/g", the unpatched and patched versions are identical. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-06documentation: move git(7) to git(1)Christian Couder1-1/+1
As the "git" man page describes the "git" command at the end-user level, it seems better to move it to man section 1. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-18Include rev-list options in git-log manpage.Miklos Vajna1-19/+2
Replace the "This manual page describes only the most frequently used options." text with the list of rev-list options in git-log manpage. (The git-diff-tree options are already included.) Move these options to a separate file and include it from both git-rev-list.txt and git-log.txt. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06Documentation: rename gitlink macro to linkgitDan McGee1-5/+5
Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration: @@ -149,7 +153,10 @@ # Inline macros. # Backslash prefix required for escape processing. # (?s) re flag for line spanning. -(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])= + +# Explicit so they can be nested. +(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])= + # Anchor: [[[id]]]. Bibliographic anchor. (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3 # Anchor: [[id,xreflabel]] This default regex now matches explicit values, and unfortunately in this case gitlink was being matched by just 'link', causing the wrong inline macro template to be applied. By renaming the macro, we can avoid being matched by the wrong regex. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-26Fix documentation of --first-parent in git-log and copy it to git-rev-listJunio C Hamano1-2/+6
Credit goes to Avi Kivity for noticing the lack of description in rev-list manual page. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05Include diff options in the git-log manpageMiklos Vajna1-3/+4
[jc: with quite a few fixups] Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28Porcelain level "log" family should recurse when diffing.Junio C Hamano1-1/+1
Most notably, "git log --name-status" stopped at top level directory changes without "-r" option. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-19Don't allow combination of -g and --reverse as it doesn't workShawn O. Pearce1-0/+1
The --walk-reflogs logic and the --reverse logic are completely incompatible with one another. Attempting to use both at the same time leads to confusing results that sometimes violates the user's formatting options or ignores the user's request to see the reflog message and timestamp. Unfortunately the implementation of both of these features is glued onto the side of the revision walking machinary in such a way that they are probably not going to be easy to make them compatible with each other. Rather than offering the user confusing results we are better off bailing out with an error message until such a time as the implementations can be refactored to be compatible. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-14Add --log-size to git log to print message sizeMarco Costalba1-0/+7
With this option git-log prints log message size just before the corresponding message. Porcelain tools could use this to speedup parsing of git-log output. Note that size refers to log message only. If also patch content is shown its size is not included. In case it is not possible to know the size upfront size value is set to zero. Signed-off-by: Marco Costalba <mcostalba@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-12Documentation for git-log --followSteven Walter1-0/+9
After vainly searching the Documentation for how to follow renames, I finally broke down and grepped the source. It would appear that Linus didn't add write and docs for this feature when he wrote it. The following patch rectifies that, hopefully sparing future users from resorting to the source code. Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Document git log --full-diffJakub Narebski1-0/+7
Based on description of commit 477f2b41310c4b1040a9e7f72720b9c39d82caf9 "git log --full-diff" adding this option. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Use tabs for indenting definition list for options in git-log.txtJakub Narebski1-1/+1
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-07War on whitespaceJunio C Hamano1-1/+0
This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-05-13Documentation: Split description of pretty formats of commit logJakub Narebski1-1/+4
Split description of pretty formats into list of pretty options (--pretty and --encoding) in new file Documentation/pretty-options.txt and description of formats itself as a separate "PRETTY FORMATS" section in pretty-formats.txt While at it correct formatting a bit, to be better laid out in the resulting manpages: git-rev-list(1), git-show(1), git-log(1) and git-diff-tree(1). Those manpages now include pretty options in the same place as it was before, and description of formats just after all options. Inspired by the split into two filesdocumentation for merge strategies: Documentation/merge-options.txt and Documentation/merge-strategies.txt Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10Document 'git-log --decorate'Michael Hendricks1-0/+3
Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-15Document -g (--walk-reflogs) option of git-logAlex Riesen1-0/+5
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-27Document git-log --first-parentJunio C Hamano1-0/+5
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-08Update git-log and git-show documentationMichael S. Tsirkin1-1/+1
Point at where the options not so frequently used are found. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17Refer users to git-rev-parse for revision specification syntax.Shawn O. Pearce1-0/+3
The revision specification syntax (sometimes referred to as SHA1-expressions) is accepted almost everywhere in Git by almost every tool. Unfortunately it is only documented in git-rev-parse.txt, and most users don't know to look there. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-14git log documentation: teach -<n> form.Junio C Hamano1-1/+1
We say "this shows only the most often used ones"; so instead of teaching --max-number=<n> form, list -<n> form which is much easier to type. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30Documentation: minor rewording for git-log and git-show pages.Junio C Hamano1-1/+3
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30Documentation: i18n commit log message notes.Junio C Hamano1-0/+6
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-22Move --pretty options into Documentation/pretty-formats.txtChris Riddoch1-2/+2
Asciidoc-include it into the manuals for programs that use the --pretty command-line option, for consistency among the docs. This describes all the pretty-formats currently listed in the cmit_fmt enum in commit.h, and also briefly describes the presence and format of the 'Merge: ' line in some pretty formats. There's a hedge that limiting your view of history can affect what goes in the Merge: line, and that --abbrev/--no-abbrev do nothing to the 'raw' format. Signed-off-by: Chris Riddoch <chris@syntacticsugar.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-05Fix up docs where "--" isn't displayed correctly.sean1-1/+1
A bare "--" doesn't show up in man or html pages correctly as two individual dashes unless backslashed as \-- in the asciidoc source. Note, no backslash is needed inside a literal block. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-28Fix trivial typo in git-log man page.Sean Estabrooks1-4/+3
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
2006-04-14git-log <diff-options> <paths> documentationJunio C Hamano1-4/+20
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16GIT 0.99.9j aka 1.0rc3v1.0rc3v0.99.9jJunio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-30Add examples for git-log documentation and others.Linus Torvalds1-0/+18
I don't think people really follow the links or think very abstractly at all in the first place. So I was thinking more of some explicit examples. I actually think every command should have an example in the man-page, and hey, here's a patch to start things off. Of course, I'm not exactly "Mr Documentation", and I don't know that this is the prettiest way to do this, but I checked that the resulting html and man-page seems at least reasonable. And hey, if the examples look like each other, that's just because I'm also not "Mr Imagination". Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10The synopsis of the manpages should use the hyphenated versionChristian Meder1-1/+1
The synopsis of the manpages should use the hyphenated version of the git commands. Adapt the remaining offenders. Signed-off-by: Christian Meder <chris@absolutegiganten.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10Remove the version tags from the manpagesJunio C Hamano1-1/+0
Signed-off-by: Christian Meder <chris@absolutegiganten.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-20[PATCH] Documentation: Update all files to use the new gitlink: macroSergey Vlasov1-1/+1
The replacement was performed automatically by these commands: perl -pi -e 's/link:(git.+)\.html\[\1\]/gitlink:$1\[1\]/g' \ README Documentation/*.txt perl -pi -e 's/link:git\.html\[git\]/gitlink:git\[7\]/g' \ README Documentation/*.txt Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07Big tool rename.Junio C Hamano1-0/+45
As promised, this is the "big tool rename" patch. The primary differences since 0.99.6 are: (1) git-*-script are no more. The commands installed do not have any such suffix so users do not have to remember if something is implemented as a shell script or not. (2) Many command names with 'cache' in them are renamed with 'index' if that is what they mean. There are backward compatibility symblic links so that you and Porcelains can keep using the old names, but the backward compatibility support is expected to be removed in the near future. Signed-off-by: Junio C Hamano <junkio@cox.net>