1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-07 17:53:12 +01:00
git/Documentation
Junio C Hamano 8a42c98501 magic pathspec: add tentative ":/path/from/top/level" pathspec support
Support ":/" magic string that can be prefixed to a pathspec element to
say "this names the path from the top-level of the working tree", when
you are in the subdirectory.

For example, you should be able to say:

    $ edit Makefile ;# top-level
    $ cd Documentation
    $ edit git.txt ;# in the subdirectory

and then do one of three things, still inside the subdirectory:

    $ git add -u .  ;# add only Documentation/git.txt
    $ git add -u :/ ;# add everything, including paths outside Documentation
    $ git add -u    ;# whatever the default setting is.

To truly support magic pathspec, the API needs to be restructured so that
get_pathspec() and init_pathspec() are unified into one call.  Currently,
the former just prefixes the user supplied pathspec with the current
subdirectory path, and the latter takes the output from the former and
pre-parses them into a bit richer structure for easier handling.  They
should become a single API function that takes the current subdirectory
path and the remainder of argv[] (after parsing --options and revision
arguments from the command line) and returns an array of parsed pathspec
elements, and "magic" should become attributes of struct pathspec_item.

This patch implements only "top" magic because it can be hacked into the
system without such a refactoring.

The syntax for magic pathspec prefix is designed to be extensible yet
simple to type to invoke a simple magic like "from the top".  The parser
for the magic prefix is hooked into get_pathspec() function in this patch,
and it needs to be moved when we refactor the API.

But we have to start from somewhere.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-06 17:08:46 -07:00
..
howto Documentation/merge subtree How-To: fix typo 2011-02-09 14:03:51 -08:00
pt_BR
RelNotes RelNotes/1.7.5.txt: typo and language fixes 2011-03-16 17:02:58 -07:00
technical
.gitattributes
.gitignore
asciidoc.conf
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
CodingGuidelines CodingGuidelines: downcase placeholders in usage messages 2011-02-15 11:53:00 -08:00
config.txt Merge branch 'jh/push-default-upstream-configname' into maint 2011-03-16 16:47:26 -07:00
date-formats.txt
diff-format.txt
diff-generate-patch.txt diff format documentation: clarify --cc and -c 2011-03-08 14:44:07 -08:00
diff-options.txt
docbook-xsl.css
docbook.xsl
everyday.txt
fetch-options.txt pull: Document the "--[no-]recurse-submodules" options 2011-02-07 15:19:09 -08:00
fix-texi.perl
git-add.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-am.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-annotate.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-apply.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-archimport.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-archive.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-bisect-lk2009.txt
git-bisect.txt Merge branch 'maint' 2011-03-19 23:21:10 -07:00
git-blame.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-branch.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-bundle.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-cat-file.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-check-attr.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-check-ref-format.txt
git-checkout-index.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-checkout.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-cherry-pick.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-cherry.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-citool.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-clean.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-clone.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-commit-tree.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-commit.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-config.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-count-objects.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-cvsexportcommit.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-cvsimport.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-cvsserver.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-daemon.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-describe.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-diff-files.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-diff-index.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-diff-tree.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-diff.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-difftool.txt Merge branch 'ss/mergetool--lib' 2011-03-19 23:24:27 -07:00
git-fast-export.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-fast-import.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-fetch-pack.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-fetch.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-filter-branch.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-fmt-merge-msg.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-for-each-ref.txt Add Author and Documentation sections to git-for-each-ref.txt 2011-03-09 12:22:15 -08:00
git-format-patch.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-fsck-objects.txt doc: add missing git footers 2011-03-11 10:59:16 -05:00
git-fsck.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-gc.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-get-tar-commit-id.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-grep.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-gui.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-hash-object.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-help.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-http-backend.txt
git-http-fetch.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-http-push.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-imap-send.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-index-pack.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-init-db.txt doc: add missing git footers 2011-03-11 10:59:16 -05:00
git-init.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-instaweb.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-log.txt Merge branch 'mg/rev-list-n-reverse-doc' 2011-03-19 23:25:32 -07:00
git-lost-found.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-ls-files.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-ls-remote.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-ls-tree.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-mailinfo.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-mailsplit.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-merge-base.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-merge-file.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-merge-index.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-merge-one-file.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-merge-tree.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-merge.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-mergetool--lib.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-mergetool.txt Merge branch 'ss/mergetool--lib' 2011-03-19 23:24:27 -07:00
git-mktag.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-mktree.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-mv.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-name-rev.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-notes.txt
git-pack-objects.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-pack-redundant.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-pack-refs.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-parse-remote.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-patch-id.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-peek-remote.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-prune-packed.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-prune.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-pull.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-push.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-quiltimport.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-read-tree.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-rebase.txt Merge branch 'jk/doc-credits' of git://github.com/peff/git 2011-03-15 13:32:09 -07:00
git-receive-pack.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-reflog.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-relink.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-remote-ext.txt Make <identifier> lowercase in Documentation 2011-02-17 11:49:54 -08:00
git-remote-fd.txt
git-remote-helpers.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-remote.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-repack.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-replace.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-repo-config.txt doc: add missing git footers 2011-03-11 10:59:16 -05:00
git-request-pull.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-rerere.txt Merge branch 'js/rerere-forget-always-take-pathspec' 2011-03-19 23:24:48 -07:00
git-reset.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-rev-list.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-rev-parse.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-revert.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-rm.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-send-email.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-send-pack.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-sh-setup.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-shell.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-shortlog.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-show-branch.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-show-index.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-show-ref.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-show.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-stage.txt doc: add missing git footers 2011-03-11 10:59:16 -05:00
git-stash.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-status.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-stripspace.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-submodule.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-svn.txt doc: add missing git footers 2011-03-11 10:59:16 -05:00
git-symbolic-ref.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-tag.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-tar-tree.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-tools.txt
git-unpack-file.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-unpack-objects.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-update-index.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-update-ref.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-update-server-info.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-upload-archive.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-upload-pack.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-var.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-verify-pack.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-verify-tag.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-web--browse.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-whatchanged.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git-write-tree.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
git.txt docs: point git.txt author credits to git-scm.com 2011-03-12 22:00:38 -05:00
gitattributes.txt docs: fix grammar in gitattributes.txt 2011-03-18 09:58:47 -07:00
gitcli.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
gitcore-tutorial.txt
gitcvs-migration.txt
gitdiffcore.txt
gitglossary.txt
githooks.txt
gitignore.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
gitk.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
gitmodules.txt doc: drop author/documentation sections from most pages 2011-03-11 10:59:16 -05:00
gitrepository-layout.txt
gitrevisions.txt
gittutorial-2.txt
gittutorial.txt
gitworkflows.txt
glossary-content.txt magic pathspec: add tentative ":/path/from/top/level" pathspec support 2011-04-06 17:08:46 -07:00
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh
mailmap.txt
Makefile
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 mergetool--lib: Add Beyond Compare 3 as a tool 2011-02-28 12:42:38 -08:00
merge-options.txt merge: enable progress reporting for rename detection 2011-02-21 10:24:08 -08:00
merge-strategies.txt
pretty-formats.txt
pretty-options.txt
pull-fetch-param.txt
rev-list-options.txt git-log.txt,rev-list-options.txt: put option blocks in proper order 2011-03-09 15:15:52 -08:00
revisions.txt Introduce CHERRY_PICK_HEAD 2011-02-21 22:58:02 -08:00
SubmittingPatches SubmittingPatches: clarify the expected commit log description 2011-03-08 21:35:22 -08:00
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt