1
0
mirror of https://github.com/git/git.git synced 2024-09-29 05:01:36 +02:00
git/Documentation
Rafael Ascensão 65516f586b log: add option to choose which refs to decorate
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>
2017-11-22 13:18:59 +09:00
..
howto
RelNotes Sync with maint 2017-11-21 14:11:40 +09:00
technical Merge branch 'bp/fsmonitor' 2017-11-21 14:07:50 +09:00
.gitattributes
.gitignore Documentation: convert SubmittingPatches to AsciiDoc 2017-11-13 13:25:19 +09:00
asciidoc.conf
asciidoctor-extensions.rb
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
CodingGuidelines Merge branch 'ab/c-translators-comment-style' into maint 2017-06-05 09:03:10 +09:00
config.txt Merge branch 'bp/fsmonitor' 2017-11-21 14:07:50 +09:00
date-formats.txt
diff-config.txt doc: add missing values "none" and "default" for diff.wsErrorHighlight 2017-07-25 14:30:49 -07:00
diff-format.txt
diff-generate-patch.txt
diff-options.txt Merge branch 'cn/diff-indent-no-longer-is-experimental' into maint 2017-11-15 12:05:04 +09:00
docbook-xsl.css
docbook.xsl
everyday.txto
fetch-options.txt
fix-texi.perl
fmt-merge-msg-config.txt
git-add.txt Merge branch 'mr/doc-negative-pathspec' into maint 2017-10-18 14:19:12 +09:00
git-am.txt
git-annotate.txt diff: --indent-heuristic is no longer experimental 2017-11-02 14:51:24 +09:00
git-apply.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
git-archimport.txt
git-archive.txt
git-bisect-lk2009.txt
git-bisect.txt bisect: mention "view" as an alternative to "visualize" 2017-11-13 10:51:14 +09:00
git-blame.txt diff: --indent-heuristic is no longer experimental 2017-11-02 14:51:24 +09:00
git-branch.txt Merge branch 'jc/branch-force-doc-readability-fix' 2017-10-19 14:45:45 +09:00
git-bundle.txt
git-cat-file.txt doc: fix minor typos (extra/duplicated words) 2017-09-14 15:09:02 +09:00
git-check-attr.txt
git-check-ignore.txt
git-check-mailmap.txt
git-check-ref-format.txt check-ref-format doc: --branch validates and expands <branch> 2017-10-18 08:01:48 +09:00
git-checkout-index.txt
git-checkout.txt Merge branch 'jc/doc-checkout' into maint 2017-10-18 14:19:14 +09:00
git-cherry-pick.txt
git-cherry.txt
git-citool.txt
git-clean.txt
git-clone.txt
git-column.txt
git-commit-tree.txt
git-commit.txt doc: reformat the paragraph containing the 'cut-line' 2017-07-18 15:04:49 -07:00
git-config.txt config doc: clarify "git config --path" example 2017-10-19 13:52:49 +09:00
git-count-objects.txt
git-credential-cache--daemon.txt
git-credential-cache.txt
git-credential-store.txt
git-credential.txt
git-cvsexportcommit.txt
git-cvsimport.txt
git-cvsserver.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
git-daemon.txt
git-describe.txt describe: teach --match to handle branches and remotes 2017-09-20 13:30:10 +09:00
git-diff-files.txt
git-diff-index.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
git-diff-tree.txt
git-diff.txt
git-difftool.txt
git-fast-export.txt
git-fast-import.txt fast-import: increase the default pack depth to 50 2017-06-12 09:50:33 -07:00
git-fetch-pack.txt
git-fetch.txt
git-filter-branch.txt Merge branch 'dg/filter-branch-filter-order-doc' 2017-10-19 14:45:45 +09:00
git-fmt-merge-msg.txt
git-for-each-ref.txt Merge branch 'js/for-each-ref-remote-name-and-ref' 2017-11-15 12:14:32 +09:00
git-format-patch.txt format-patch: have progress option while generating patches 2017-08-14 14:09:45 -07:00
git-fsck-objects.txt
git-fsck.txt
git-gc.txt
git-get-tar-commit-id.txt
git-grep.txt Merge branch 'mr/doc-negative-pathspec' into maint 2017-10-18 14:19:12 +09:00
git-gui.txt
git-hash-object.txt
git-help.txt
git-http-backend.txt
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt
git-index-pack.txt
git-init-db.txt
git-init.txt
git-instaweb.txt
git-interpret-trailers.txt Merge branch 'jk/trailers-parse' 2017-08-26 22:55:04 -07:00
git-log.txt log: add option to choose which refs to decorate 2017-11-22 13:18:59 +09:00
git-ls-files.txt fsmonitor: add documentation for the fsmonitor extension. 2017-10-01 17:23:05 +09:00
git-ls-remote.txt
git-ls-tree.txt
git-mailinfo.txt
git-mailsplit.txt
git-merge-base.txt
git-merge-file.txt
git-merge-index.txt
git-merge-one-file.txt
git-merge-tree.txt
git-merge.txt Merge branch 'wk/pull-signoff' 2017-11-06 14:24:24 +09:00
git-mergetool--lib.txt
git-mergetool.txt
git-mktag.txt
git-mktree.txt
git-mv.txt
git-name-rev.txt
git-notes.txt doc: fix minor typos (extra/duplicated words) 2017-09-14 15:09:02 +09:00
git-p4.txt
git-pack-objects.txt Doc: clarify that pack-objects makes packs, plural 2017-08-23 10:39:41 -07:00
git-pack-redundant.txt
git-pack-refs.txt
git-parse-remote.txt
git-patch-id.txt doc: remove unsupported parameter from patch-id 2017-07-28 14:41:32 -07:00
git-prune-packed.txt
git-prune.txt
git-pull.txt Merge branch 'sb/pull-rebase-submodule' 2017-07-13 16:14:54 -07:00
git-push.txt builtin/push.c: add push.pushOption config 2017-10-24 09:57:54 +09:00
git-quiltimport.txt
git-read-tree.txt Merge branch 'jk/doc-read-tree-table-asciidoctor-fix' into maint 2017-10-18 14:19:11 +09:00
git-rebase.txt Merge branch 'js/rebase-i-final' 2017-10-03 15:42:47 +09:00
git-receive-pack.txt
git-reflog.txt
git-remote-ext.txt
git-remote-fd.txt
git-remote-helpers.txto
git-remote-testgit.txt
git-remote.txt
git-repack.txt
git-replace.txt
git-request-pull.txt
git-rerere.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
git-reset.txt Spelling fixes 2017-06-27 10:35:49 -07:00
git-rev-list.txt
git-rev-parse.txt Merge branch 'sb/rev-parse-show-superproject-root' 2017-10-28 10:18:40 +09:00
git-revert.txt
git-rm.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
git-send-email.txt Merge branch 'xz/send-email-batch-size' 2017-07-06 18:14:46 -07:00
git-send-pack.txt Merge branch 'ma/parse-maybe-bool' 2017-08-22 10:29:03 -07:00
git-sh-i18n--envsubst.txt
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt shell: drop git-cvsserver support by default 2017-09-12 11:05:58 +09:00
git-shortlog.txt
git-show-branch.txt
git-show-index.txt
git-show-ref.txt
git-show.txt
git-stage.txt
git-stash.txt stash: mark "git stash save" deprecated in the man page 2017-10-27 09:59:11 +09:00
git-status.txt status: document options to show matching ignored files 2017-10-31 11:54:21 +09:00
git-stripspace.txt
git-submodule.txt Merge branch 'sb/submodule-doc' 2017-07-12 15:18:21 -07:00
git-svn.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
git-symbolic-ref.txt
git-tag.txt Merge branch 'jk/ref-filter-colors-fix' into maint 2017-10-18 14:20:43 +09:00
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt
git-update-index.txt Merge branch 'bp/fsmonitor' 2017-11-21 14:07:50 +09:00
git-update-ref.txt
git-update-server-info.txt
git-upload-archive.txt
git-upload-pack.txt
git-var.txt
git-verify-commit.txt
git-verify-pack.txt
git-verify-tag.txt
git-web--browse.txt
git-whatchanged.txt
git-worktree.txt
git-write-tree.txt
git.txt Merge branch 'av/fsmonitor' 2017-11-21 14:07:51 +09:00
gitattributes.txt Documentation: mention that eol can change the dirty status of paths 2017-09-07 08:57:54 +09:00
gitcli.txt stash: update documentation to use 'stash entry' 2017-06-18 22:16:36 -07:00
gitcore-tutorial.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
gitcredentials.txt
gitcvs-migration.txt
gitdiffcore.txt
giteveryday.txt
gitglossary.txt
githooks.txt Merge branch 'bp/fsmonitor' 2017-11-21 14:07:50 +09:00
gitignore.txt
gitk.txt
gitmodules.txt
gitnamespaces.txt
gitremote-helpers.txt
gitrepository-layout.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
gitrevisions.txt
gitsubmodules.txt submodules: overhaul documentation 2017-06-22 15:25:25 -07:00
gittutorial-2.txt
gittutorial.txt treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
gitweb.conf.txt
gitweb.txt
gitworkflows.txt stash: replace "git stash save" with "git stash push" in the documentation 2017-10-27 09:58:38 +09:00
glossary-content.txt Merge branch 'mr/doc-negative-pathspec' into maint 2017-10-18 14:19:12 +09:00
howto-index.sh
i18n.txt doc: camelCase the i18n config variables to improve readability 2017-07-17 15:11:26 -07:00
install-doc-quick.sh
install-webdoc.sh
line-range-format.txt
lint-gitlink.perl
mailmap.txt
Makefile Documentation: convert SubmittingPatches to AsciiDoc 2017-11-13 13:25:19 +09:00
manpage-1.72.xsl
manpage-base-url.xsl.in
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage-suppress-sp.xsl
merge-config.txt
merge-options.txt Merge branch 'wk/pull-signoff' 2017-11-06 14:24:24 +09:00
merge-strategies.txt merge-strategies: avoid implying that "-s theirs" exists 2017-09-25 14:34:23 +09:00
pretty-formats.txt Merge branch 'jk/trailers-parse' 2017-08-26 22:55:04 -07:00
pretty-options.txt
pull-fetch-param.txt fetch doc: src side of refspec could be full SHA-1 2017-10-18 05:59:34 +09:00
rev-list-options.txt Merge branch 'sg/rev-list-doc-reorder-fix' 2017-10-28 10:18:42 +09:00
revisions.txt
sequencer.txt
SubmittingPatches Merge branch 'ad/submitting-patches-title-decoration' 2017-11-21 14:07:51 +09:00
texi.xsl
transfer-data-leaks.txt
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt stash: replace "git stash save" with "git stash push" in the documentation 2017-10-27 09:58:38 +09:00