git-commit-vandalism/Documentation
Shawn O. Pearce 8713ab3079 Improve git-describe performance by reducing revision listing.
My prior version of git-describe ran very slowly on even reasonably
sized projects like git.git and linux.git as it tended to identify
a large number of possible tags and then needed to generate the
revision list for each of those tags to sort them and select the
best tag to describe the input commit.

All we really need is the number of commits in the input revision
which are not in the tag.  We can generate these counts during
the revision walking and tag matching loop by assigning a color to
each tag and coloring the commits as we walk them.  This limits us
to identifying no more than 26 possible tags, as there is limited
space available within the flags field of struct commit.

The limitation of 26 possible tags is hopefully not going to be a
problem in real usage, as most projects won't create 26 maintenance
releases and merge them back into a development trunk after the
development trunk was tagged with a release candidate tag.  If that
does occur git-describe will start to revert to its old behavior of
using the newer maintenance release tag to describe the development
trunk, rather than the development trunk's own tag.  The suggested
workaround would be to retag the development trunk's tip.

However since even 26 possible tags can take a while to generate a
description for on some projects I'm defaulting the limit to 10 but
offering the user --candidates to increase the number of possible
matches if they need a more accurate result.  I specifically chose
10 for the default as it seems unlikely projects will have more
than 10 maintenance releases merged into a development trunk before
retagging the development trunk, and it seems to perform about the
same on linux.git as v1.4.4.4 git-describe.

A large amount of debugging information was also added during
the development of this change, so I've left it in to be toggled
on with --debug.  It may be useful to the end user to help them
understand why git-describe took one particular tag over another.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-14 21:17:27 -08:00
..
howto use 'init' instead of 'init-db' for shipped docs and tools 2007-01-12 13:36:16 -08:00
technical Update send-pack pipeline documentation. 2007-01-01 14:35:16 -08:00
.gitignore Don't include ../README in git.txt - make a local copy 2006-01-24 23:16:31 -08:00
asciidoc.conf escape tilde in Documentation/git-rev-parse.txt 2006-10-03 01:04:19 -07:00
build-docdep.perl Clean build annoyance. 2005-11-08 08:58:52 -08:00
callouts.xsl spurious .sp in manpages 2006-12-13 09:41:18 -08:00
config.txt Allow the user to control the verbosity of merge-recursive. 2007-01-14 12:20:39 -08:00
core-tutorial.txt some doc updates 2007-01-14 21:12:14 -08:00
cvs-migration.txt use 'init' instead of 'init-db' for shipped docs and tools 2007-01-12 13:36:16 -08:00
diff-format.txt Update documentation to remove incorrect GIT_DIFF_OPTS example. 2006-11-27 12:08:36 -08:00
diff-options.txt Document --numstat in git-apply and git-diff 2006-12-26 00:15:26 -08:00
diffcore.txt Fix recent documentation format breakage. 2005-10-29 00:50:42 -07:00
everyday.txt some doc updates 2007-01-14 21:12:14 -08:00
fetch-options.txt Update clone/fetch documentation with --depth (shallow clone) option 2007-01-01 15:08:06 -08:00
git-add.txt git-add -f: allow adding otherwise ignored files. 2006-12-25 17:46:38 -08:00
git-am.txt --utf8 is now default for 'git-am' 2007-01-08 14:45:59 -08:00
git-annotate.txt Add git-annotate(1) and git-blame(1) 2006-04-18 12:06:55 -07:00
git-apply.txt Document --numstat in git-apply and git-diff 2006-12-26 00:15:26 -08:00
git-applymbox.txt -u is now default for 'git-applymbox' 2007-01-09 21:20:39 -08:00
git-applypatch.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-archimport.txt git/Documentation: fix SYNOPSIS style bugs 2006-03-05 17:02:02 -08:00
git-archive.txt git-archive: update documentation 2006-09-25 21:17:43 -07:00
git-bisect.txt Documentation: talk about pathspec in bisect. 2005-12-05 00:15:24 -08:00
git-blame.txt Documentation: move blame examples 2006-11-09 10:44:56 -08:00
git-branch.txt Add documentation for git-branch's color configuration. 2007-01-03 08:16:02 -08:00
git-cat-file.txt cat-file: document -p option 2006-05-24 22:29:23 -07:00
git-check-ref-format.txt Some doc typo fixes 2006-06-07 11:49:35 -07:00
git-checkout-index.txt Fix up docs where "--" isn't displayed correctly. 2006-05-05 14:21:52 -07:00
git-checkout.txt Merge branch 'master' into sp/reflog 2006-05-24 16:49:24 -07:00
git-cherry-pick.txt cherry-pick: make -r the default 2006-10-05 17:54:14 -07:00
git-cherry.txt git-cherry: document limit and add diagram 2006-10-26 18:53:18 -07:00
git-clean.txt Teach git-clean optional <paths>... parameters. 2006-05-08 16:40:45 -07:00
git-clone.txt Describe git-clone's actual behavior in the summary 2007-01-06 10:40:54 -08:00
git-commit-tree.txt Documentation: i18n commit log message notes. 2006-12-30 02:36:08 -08:00
git-commit.txt git-commit documentation: -a adds and also removes 2007-01-13 12:26:13 -08:00
git-convert-objects.txt Convert usage of GIT and Git into git 2005-10-10 16:01:31 -07:00
git-count-objects.txt count-objects -v: show number of packs as well. 2006-12-27 01:05:00 -08:00
git-cvsexportcommit.txt cvsexportcommit - add -a (add author line) flag, cleanup warnings 2006-07-23 22:51:14 -07:00
git-cvsimport.txt cvsimport: document -S and -L options 2007-01-08 03:01:32 -08:00
git-cvsserver.txt git-cvsserver asciidoc formatting tweaks 2006-06-07 16:32:50 -07:00
git-daemon.txt Documentation: add git in /etc/services. 2006-10-27 02:10:52 -07:00
git-describe.txt Improve git-describe performance by reducing revision listing. 2007-01-14 21:17:27 -08:00
git-diff-files.txt Assorted typo fixes 2006-07-09 02:42:41 -07:00
git-diff-index.txt Minor grammar fixes for git-diff-index.txt 2006-11-02 18:03:31 -08:00
git-diff-stages.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-diff-tree.txt Move --pretty options into Documentation/pretty-formats.txt 2006-11-22 16:06:32 -08:00
git-diff.txt diff documentation: mostly talk about <commit> 2006-12-20 14:41:54 -08:00
git-fetch-pack.txt improve fetch-pack's handling of kept packs 2006-11-03 00:24:07 -08:00
git-fetch.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-fmt-merge-msg.txt Documentation for git-fmt-merge-msg 2005-11-01 14:45:49 -08:00
git-for-each-ref.txt Documentation: fix git-format-patch mark-up and link it from git.txt 2006-10-28 14:25:41 -07:00
git-format-patch.txt Add option to set initial In-Reply-To/References 2006-07-14 20:41:37 -07:00
git-fsck-objects.txt Documentation: Spelling fixes 2006-06-03 23:54:55 -07:00
git-gc.txt Create 'git gc' to perform common maintenance operations. 2006-12-27 01:53:03 -08:00
git-get-tar-commit-id.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-grep.txt grep --all-match 2006-09-27 23:59:09 -07:00
git-hash-object.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-http-fetch.txt Teach git-http-fetch the --stdin switch 2006-07-27 19:33:48 -07:00
git-http-push.txt Documentation: add missing second colons and remove a typo 2006-10-12 09:42:36 -07:00
git-imap-send.txt Several trivial documentation touch ups. 2006-05-05 14:21:18 -07:00
git-index-pack.txt remove .keep pack lock files when done with refs update 2006-11-03 00:24:07 -08:00
git-init-db.txt Document git-init 2007-01-11 12:58:10 -08:00
git-init.txt use 'init' instead of 'init-db' for shipped docs and tools 2007-01-12 13:36:16 -08:00
git-instaweb.txt Add git-instaweb, instantly browse the working repo with gitweb 2006-07-01 18:29:26 -07:00
git-local-fetch.txt Teach git-local-fetch the --stdin switch 2006-07-27 19:33:48 -07:00
git-log.txt git log documentation: teach -<n> form. 2007-01-14 18:23:22 -08:00
git-lost-found.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-ls-files.txt Documentation about exclude/ignore files 2006-07-13 21:52:42 -07:00
git-ls-remote.txt git-ls-remote(1): document --upload-pack 2006-08-25 19:25:58 -07:00
git-ls-tree.txt Documentation: git-ls-tree (typofix) 2006-06-07 16:29:36 -07:00
git-mailinfo.txt -u is now default for 'git-mailinfo'. 2007-01-09 21:32:49 -08:00
git-mailsplit.txt Assorted typo fixes 2006-07-09 02:42:41 -07:00
git-merge-base.txt Update the documentation for git-merge-base 2006-05-15 23:19:46 -07:00
git-merge-file.txt Fix mis-mark-up in git-merge-file.txt documentation 2006-12-17 01:14:44 -08:00
git-merge-index.txt Get rid of the dependency on RCS' merge program 2006-12-12 21:47:29 -08:00
git-merge-one-file.txt Remove the version tags from the manpages 2005-10-10 14:49:52 -07:00
git-merge-tree.txt Documentation: add a couple of missing docs. 2006-04-13 00:21:06 -07:00
git-merge.txt Use GIT_REFLOG_ACTION environment variable instead. 2006-12-28 01:05:15 -08:00
git-mktag.txt Remove the version tags from the manpages 2005-10-10 14:49:52 -07:00
git-mktree.txt Documentation: add a couple of missing docs. 2006-04-13 00:21:06 -07:00
git-mv.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-name-rev.txt typofix (git-name-rev documentation) 2006-07-11 12:45:20 -07:00
git-p4import.txt use 'init' instead of 'init-db' for shipped docs and tools 2007-01-12 13:36:16 -08:00
git-pack-objects.txt git-pack-objects progress flag documentation and cleanup 2006-11-07 16:05:37 -08:00
git-pack-redundant.txt Assorted typo fixes 2006-07-09 02:42:41 -07:00
git-pack-refs.txt --prune is now default for 'pack-refs' 2007-01-08 14:46:00 -08:00
git-parse-remote.txt [PATCH] Documentation: Update all files to use the new gitlink: macro 2005-09-20 15:07:52 -07:00
git-patch-id.txt Documentation: Spelling fixes 2006-06-03 23:54:55 -07:00
git-peek-remote.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-prune-packed.txt Make git-prune-packed a bit more chatty. 2007-01-12 15:10:29 -08:00
git-prune.txt Fix up docs where "--" isn't displayed correctly. 2006-05-05 14:21:52 -07:00
git-pull.txt some doc updates 2007-01-14 21:12:14 -08:00
git-push.txt git-push: document removal of remote ref with :<dst> pathspec 2006-12-13 01:11:05 -08:00
git-quiltimport.txt Implement a --dry-run option to git-quiltimport 2006-05-18 22:55:57 -07:00
git-read-tree.txt read-tree: document --exclude-per-directory 2006-12-05 23:44:23 -08:00
git-rebase.txt Merge branch 'maint' 2006-11-06 22:56:07 -08:00
git-receive-pack.txt Document receive.denyNonFastforwards 2006-09-20 23:32:22 -07:00
git-reflog.txt git-reflog: gc.* configuration and documentation. 2006-12-27 01:47:57 -08:00
git-relink.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-remote.txt Documentation: add git-remote man page 2007-01-08 21:42:37 -08:00
git-repack.txt Merge branch 'np/pack' 2006-10-22 22:51:42 -07:00
git-repo-config.txt Teach Git how to parse standard power of 2 suffixes. 2006-12-30 22:22:14 -08:00
git-request-pull.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-rerere.txt some doc updates 2007-01-14 21:12:14 -08:00
git-reset.txt Document git-reset <commit> -- <paths>... 2006-12-26 00:21:01 -08:00
git-resolve.txt The synopsis of the manpages should use the hyphenated version 2005-10-10 16:01:32 -07:00
git-rev-list.txt Move commit reencoding parameter parsing to revision.c 2006-12-30 15:58:32 -08:00
git-rev-parse.txt Merge branch 'jc/pickaxe' 2006-11-07 16:33:59 -08:00
git-revert.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-rm.txt git-rm: Documentation 2006-12-25 03:29:08 -08:00
git-runstatus.txt Document git-runstatus 2006-11-18 14:04:45 -08:00
git-send-email.txt git-send-email: Read the default SMTP server from the GIT config file 2006-10-29 12:45:23 -08:00
git-send-pack.txt Documentation: add missing second colons and remove a typo 2006-10-12 09:42:36 -07:00
git-sh-setup.txt Documentation: Spelling fixes 2006-06-03 23:54:55 -07:00
git-shell.txt git/Documentation: fix SYNOPSIS style bugs 2006-03-05 17:02:02 -08:00
git-shortlog.txt Build in shortlog 2006-11-19 22:59:05 -08:00
git-show-branch.txt show-branch --reflog: add documentation. 2006-12-26 00:11:50 -08:00
git-show-index.txt Convert usage of GIT and Git into git 2005-10-10 16:01:31 -07:00
git-show-ref.txt show-ref --hash=len, --abbrev=len, and --abbrev 2006-10-01 00:32:44 -07:00
git-show.txt Documentation: minor rewording for git-log and git-show pages. 2006-12-30 02:36:13 -08:00
git-ssh-fetch.txt Remove the version tags from the manpages 2005-10-10 14:49:52 -07:00
git-ssh-upload.txt Remove the version tags from the manpages 2005-10-10 14:49:52 -07:00
git-status.txt Documentation: git-status takes the same options as git-commit 2006-08-08 21:55:05 -07:00
git-stripspace.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-svn.txt use 'init' instead of 'init-db' for shipped docs and tools 2007-01-12 13:36:16 -08:00
git-svnimport.txt git-svnimport: support for incremental import 2007-01-06 22:47:58 -08:00
git-symbolic-ref.txt De-emphasise the symbolic link documentation. 2006-12-01 21:57:47 -08:00
git-tag.txt git-tag: add flag to verify a tag 2007-01-03 12:31:43 -08:00
git-tar-tree.txt Remove upload-tar and make git-tar-tree a thin wrapper to git-archive 2006-09-24 19:55:08 -07:00
git-tools.txt Assorted typo fixes 2006-07-09 02:42:41 -07:00
git-unpack-file.txt Remove the version tags from the manpages 2005-10-10 14:49:52 -07:00
git-unpack-objects.txt unpack-objects -r: call it "recover". 2006-09-13 12:59:49 -07:00
git-update-index.txt git-update-index(1): fix use of quoting in section title 2006-11-12 18:50:20 -08:00
git-update-ref.txt update-ref: -d flag and ref creation safety. 2006-09-27 02:01:42 -07:00
git-update-server-info.txt Documentation: HTTP needs update-server-info. 2005-12-17 11:39:39 -08:00
git-upload-archive.txt Add git-upload-archive 2006-09-09 11:57:37 -07:00
git-upload-pack.txt Retire git-clone-pack 2006-06-21 02:34:14 -07:00
git-var.txt Deprecate usage of git-var -l for getting config vars list 2006-04-24 22:29:36 -07:00
git-verify-pack.txt Fix up docs where "--" isn't displayed correctly. 2006-05-05 14:21:52 -07:00
git-verify-tag.txt Remove trailing dot after short description 2006-03-09 11:44:11 -08:00
git-whatchanged.txt Fix up docs where "--" isn't displayed correctly. 2006-05-05 14:21:52 -07:00
git-write-tree.txt write-tree: --prefix=<path> 2006-05-01 22:29:16 -07:00
git.txt use 'init' instead of 'init-db' for shipped docs and tools 2007-01-12 13:36:16 -08:00
gitk.txt gitk(1): mention --all 2006-09-20 09:00:14 -07:00
glossary.txt glossary typofix 2007-01-12 14:13:53 -08:00
hooks.txt use 'init' instead of 'init-db' for shipped docs and tools 2007-01-12 13:36:16 -08:00
howto-index.sh Allow asciidoc formatted documentation in howto/ 2005-08-29 22:38:12 -07:00
i18n.txt Documentation: i18n commit log message notes. 2006-12-30 02:36:08 -08:00
install-doc-quick.sh Makefile: add quick-install-doc for installing pre-built manpages 2006-12-23 09:22:30 -08:00
install-webdoc.sh Documentation/Makefile: create tarballs for the man pages and html files 2006-05-18 20:15:45 -07:00
Makefile Makefile: add quick-install-doc for installing pre-built manpages 2006-12-23 09:22:30 -08:00
merge-options.txt git-merge --squash 2006-06-24 01:11:19 -07:00
merge-strategies.txt Documentation: recursive is the default strategy these days. 2005-12-08 14:04:33 -08:00
pretty-formats.txt Move commit reencoding parameter parsing to revision.c 2006-12-30 15:58:32 -08:00
pull-fetch-param.txt Documentation: remove master:origin example from pull-fetch-param.txt 2007-01-01 14:38:08 -08:00
repository-layout.txt use 'init' instead of 'init-db' for shipped docs and tools 2007-01-12 13:36:16 -08:00
sort_glossary.pl Added definitions for a few words: 2006-05-03 22:31:50 -07:00
SubmittingPatches Teach SubmittingPatches about git-commit -s 2006-11-21 11:40:18 -08:00
tutorial-2.txt "init-db" can really be just "init" 2007-01-07 18:03:07 -08:00
tutorial.txt some doc updates 2007-01-14 21:12:14 -08:00
urls.txt Fix formatting for urls section of fetch, pull, and push manpages 2006-12-31 18:40:17 -08:00