aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-rev-parse.txt
Commit message (Collapse)AuthorAge
* Documentation: rename gitlink macro to linkgitDan McGee2008-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* git-rev-parse --symbolic-full-nameJunio C Hamano2008-01-06
| | | | | | | | | The plumbing level can understand that the user meant "refs/heads/master" when the user says "master" or "heads/master", but there is no easy way for the scripts to figure it out without duplicating the dwim_ref() logic. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.Pierre Habouzit2007-11-05
| | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Document what the stage numbers in the :$n:path syntax mean.Steven Grimm2007-08-19
| | | | | | | | | The git-rev-parse manpage talks about the :$n:path notation (buried deep in a list of other syntax) but it just says $n is a "stage number" -- someone who is not familiar with the internals of git's merge implementation is never going to be able to figure out that "1", "2", and "3" means. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix an illustration in git-rev-parse.txtJunio C Hamano2007-08-10
| | | | | | | | This hides the backslash at the end of line from AsciiDoc toolchain by introducing a trailing whitespace on one line in an illustration in git-rev-parse.txt. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'ei/worktree+filter'Junio C Hamano2007-07-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | * ei/worktree+filter: filter-branch: always export GIT_DIR if it is set setup_git_directory: fix segfault if repository is found in cwd test GIT_WORK_TREE extend rev-parse test for --is-inside-work-tree Use new semantics of is_bare/inside_git_dir/inside_work_tree introduce GIT_WORK_TREE to specify the work tree test git rev-parse rev-parse: introduce --is-bare-repository rev-parse: document --is-inside-git-dir
| * introduce GIT_WORK_TREE to specify the work treeMatthias Lederhofer2007-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setup_gdg is used as abbreviation for setup_git_directory_gently. The work tree can be specified using the environment variable GIT_WORK_TREE and the config option core.worktree (the environment variable has precendence over the config option). Additionally there is a command line option --work-tree which sets the environment variable. setup_gdg does the following now: GIT_DIR unspecified repository in .git directory parent directory of the .git directory is used as work tree, GIT_WORK_TREE is ignored GIT_DIR unspecified repository in cwd GIT_DIR is set to cwd see the cases with GIT_DIR specified what happens next and also see the note below GIT_DIR specified GIT_WORK_TREE/core.worktree unspecified cwd is used as work tree GIT_DIR specified GIT_WORK_TREE/core.worktree specified the specified work tree is used Note on the case where GIT_DIR is unspecified and repository is in cwd: GIT_WORK_TREE is used but is_inside_git_dir is always true. I did it this way because setup_gdg might be called multiple times (e.g. when doing alias expansion) and in successive calls setup_gdg should do the same thing every time. Meaning of is_bare/is_inside_work_tree/is_inside_git_dir: (1) is_bare_repository A repository is bare if core.bare is true or core.bare is unspecified and the name suggests it is bare (directory not named .git). The bare option disables a few protective checks which are useful with a working tree. Currently this changes if a repository is bare: updates of HEAD are allowed git gc packs the refs the reflog is disabled by default (2) is_inside_work_tree True if the cwd is inside the associated working tree (if there is one), false otherwise. (3) is_inside_git_dir True if the cwd is inside the git directory, false otherwise. Before this patch is_inside_git_dir was always true for bare repositories. When setup_gdg finds a repository git_config(git_default_config) is always called. This ensure that is_bare_repository makes use of core.bare and does not guess even though core.bare is specified. inside_work_tree and inside_git_dir are set if setup_gdg finds a repository. The is_inside_work_tree and is_inside_git_dir functions will die if they are called before a successful call to setup_gdg. Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * rev-parse: introduce --is-bare-repositoryMatthias Lederhofer2007-06-06
| | | | | | | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * rev-parse: document --is-inside-git-dirMatthias Lederhofer2007-06-06
| | | | | | | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Document git rev-parse --is-inside-git-dirJakub Narebski2007-06-16
| | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | War on whitespaceJunio C Hamano2007-06-07
|/ | | | | | | | | 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>
* SPECIFYING RANGES typo fix: it it => it isJari Aalto2007-05-10
| | | | | Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2007-03-29
|\ | | | | | | | | | | | | * maint: git-upload-pack: make sure we close unused pipe ends Documentation/git-rev-parse.txt: fix example in SPECIFYING RANGES. Documentation/git-svnimport.txt: fix typo.
| * Documentation/git-rev-parse.txt: fix example in SPECIFYING RANGES.Gerrit Pape2007-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Please see http://bugs.debian.org/404795: In git-rev-parse(1), there is an example commit tree, which is used twice. The explanation for this tree is very clear: B and C are commit *parents* to A. However, when the tree is reused as an example in the SPECIFYING RANGES, the manpage author screws up and uses A as a commit *parent* to B and C! I.e., he inverts the tree. And the fact that for this example you need to read the tree backwards is not explained anywhere (and it would be confusing even if it was). Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | object name: introduce ':/<oneline prefix>' notationJohannes Schindelin2007-02-24
|/ | | | | | | | | | | | | | | | | | | To name a commit, you can now say $ git rev-parse ':/Initial revision of "git"' and it will return the hash of the youngest commit whose commit message (the oneline) begins with the given prefix. For future extension, a leading exclamation mark is treated specially: if you want to match a commit message starting with a '!', just repeat the exclamation mark. So, to match a commit which starts with '!Hello World', use $ git show ':/!!Hello World' Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Update the documentation for the new '@{...}' syntaxJohannes Schindelin2007-02-01
| | | | | Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document the master@{n} reflog query syntax.Shawn O. Pearce2007-01-17
| | | | | | | | | In ab2a1a32 Junio improved the reflog query logic to support obtaining the n-th prior value of a ref, but this was never documented in git-rev-parse. Now it is. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'jc/pickaxe'Junio C Hamano2006-11-07
|\
| * Introduce a new revision set operator <rev>^!Junio C Hamano2006-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a shorthand for "<rev> --not <rev>^@", i.e. "include this commit but exclude any of its parents". When a new file $F is introduced by revision $R, this notation can be used to find a copy-and-paste from existing file in the parents of that revision without annotating the ancestry of the lines that were copied from: git pickaxe -f -C $R^! -- $F Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Documentation: clarify refname disambiguation rules.Junio C Hamano2006-10-26
|/ | | | | | | | Nobody should create ambiguous refs (i.e. have tag "foobar" and branch "foobar" at the same time) that need to be disambiguated with these rules to keep sanity, but the rules are there so document them. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add revspec documentation for ':path', ':[0-3]:path' and git-describepclouds@gmail.com2006-10-18
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* escape tilde in Documentation/git-rev-parse.txtJunio C Hamano2006-10-03
| | | | | | | | | | | | Fixes a failure to build the git-rev-parse manpage, seen with asciidoc 8.0.0 We would love to use nicer quoting $$~$$ but alas asciidoc 7 does not know about it. So use asciidoc.conf and define {tilde} to be &#126;. Signed-off-by: Junio C Hamano <junkio@cox.net> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* rev-parse documentation: talk about range notation.Junio C Hamano2006-07-06
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'sp/reflog'Junio C Hamano2006-06-03
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sp/reflog: fetch.c: do not pass uninitialized lock to unlock_ref(). Test that git-branch -l works. Verify git-commit provides a reflog message. Enable ref log creation in git checkout -b. Create/delete branch ref logs. Include ref log detail in commit, reset, etc. Change order of -m option to update-ref. Correct force_write bug in refs.c Change 'master@noon' syntax to 'master@{noon}'. Log ref updates made by fetch. Force writing ref if it doesn't exist. Added logs/ directory to repository layout. General ref log reading improvements. Fix ref log parsing so it works properly. Support 'master@2 hours ago' syntax Log ref updates to logs/refs/<ref> Convert update-ref to use ref_lock API. Improve abstraction of ref lock/write.
| * Change 'master@noon' syntax to 'master@{noon}'.Shawn Pearce2006-05-19
| | | | | | | | | | | | | | | | | | | | | | Its ambiguous to parse "master@2006-05-17 18:30:foo" when foo is meant as a file name and ":30" is meant as 30 minutes past 6 pm. Therefore all date specifications in a sha1 expression must now appear within brackets and the ':' splitter used for the path name in a sha1 expression ignores ':' appearing within brackets. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Support 'master@2 hours ago' syntaxShawn Pearce2006-05-17
| | | | | | | | | | | | | | | | | | | | | | Extended sha1 expressions may now include date specifications which indicate a point in time within the local repository's history. If the ref indicated to the left of '@' has a log in $GIT_DIR/logs/<ref> then the value of the ref at the time indicated by the specification is obtained from the ref's log. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Documentation: Spelling fixesHorst H. von Brand2006-06-03
|/ | | | | Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add "--branches", "--tags" and "--remotes" options to git-rev-parse.Sean2006-05-14
| | | | | | | | | "git branch" uses "rev-parse --all" and becomes much too slow when there are many tags (it scans all refs). Use the new "--branches" option of rev-parse to speed things up. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Remove trailing dot after short descriptionFredrik Kuivinen2006-03-09
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: fix typo in rev-parse --short option description.Junio C Hamano2006-02-19
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document --short and --git-dir in git-rev-parse(1)Jonas Fonseca2006-02-17
| | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
* rev-parse: --show-cdupJunio C Hamano2005-12-22
| | | | | | | | | | | When --show-prefix is useful, sometimes it is easier to cd up to the toplevel of the tree. This is equivalent to: git rev-parse --show-prefix | sed -e 's|[^/][^/]*|..|g' but we do not have to invoke sed for that. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Illustration: "Commit DAG Revision Naming"Junio C Hamano2005-11-03
| | | | | | Jon Loeliger's ASCII art in the git-rev-parse(1) manual. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document --since and --until options to rev-parse.Junio C Hamano2005-11-02
| | | | | | | The usability magic were hidden in the source code without being documented, and even the maintainer did not know about them ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
* ref-format documentation.Junio C Hamano2005-10-16
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Convert usage of GIT and Git into gitChristian Meder2005-10-10
| | | | | | | Convert usage of GIT and Git into git. Signed-off-by: Christian Meder <chris@absolutegiganten.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix usage of carets in git-rev-parse(1)Jonas Fonseca2005-10-05
| | | | | | | ... but using a {caret} attribute. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Documentation: Update all files to use the new gitlink: macroSergey Vlasov2005-09-20
| | | | | | | | | | | | 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>
* Arrgh -- another asciidoc caret workaround.Junio C Hamano2005-09-18
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document extended SHA1 used by git-rev-parse.Junio C Hamano2005-09-18
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation updates.Junio C Hamano2005-09-07
| | | | | | | | parse-remote and rev-parse gets full documentation. Add skeleton for archimport. Link them from the main git(7) page. Also move git-daemon and git-request-pull out of 'undocumented' section. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add placeholders for missing documents.Junio C Hamano2005-08-23
The text does not say anything interesting, but at least the author list should reflect something close to reality. Signed-off-by: Junio C Hamano <junkio@cox.net>