path: root/Documentation/git-rev-parse.txt
AgeCommit message (Collapse)Author
2008-01-31git rev-parse manpage: spelling fixMiklos Vajna
Signed-off-by: Miklos Vajna <> Signed-off-by: Junio C Hamano <>
2008-01-30fix doc typosJim Meyering
Signed-off-by: Jim Meyering <> Signed-off-by: Junio C Hamano <>
2008-01-07Documentation: rename gitlink macro to linkgitDan McGee
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 <> Signed-off-by: Junio C Hamano <>
2008-01-07git-rev-parse --symbolic-full-nameJunio C Hamano
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 <>
2007-11-06Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.Pierre Habouzit
Signed-off-by: Pierre Habouzit <> Signed-off-by: Junio C Hamano <>
2007-08-20Document what the stage numbers in the :$n:path syntax mean.Steven Grimm
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 <>
2007-08-10Fix an illustration in git-rev-parse.txtJunio C Hamano
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 <>
2007-07-01Merge branch 'ei/worktree+filter'Junio C Hamano
* 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
2007-06-16Document git rev-parse --is-inside-git-dirJakub Narebski
Signed-off-by: Jakub Narebski <> Signed-off-by: Junio C Hamano <>
2007-06-07War on whitespaceJunio C Hamano
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 <>
2007-06-06introduce GIT_WORK_TREE to specify the work treeMatthias Lederhofer
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 <> Signed-off-by: Junio C Hamano <>
2007-06-06rev-parse: introduce --is-bare-repositoryMatthias Lederhofer
Signed-off-by: Matthias Lederhofer <> Signed-off-by: Junio C Hamano <>
2007-06-06rev-parse: document --is-inside-git-dirMatthias Lederhofer
Signed-off-by: Matthias Lederhofer <> Signed-off-by: Junio C Hamano <>
2007-05-10SPECIFYING RANGES typo fix: it it => it isJari Aalto
Signed-off-by: Jari Aalto <> Signed-off-by: Junio C Hamano <>
2007-03-30Merge branch 'maint'Junio C Hamano
* 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.
2007-03-29Documentation/git-rev-parse.txt: fix example in SPECIFYING RANGES.Gerrit Pape
Please see 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 <> Signed-off-by: Junio C Hamano <>
2007-02-24object name: introduce ':/<oneline prefix>' notationJohannes Schindelin
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 <> Signed-off-by: Junio C Hamano <>
2007-02-02Update the documentation for the new '@{...}' syntaxJohannes Schindelin
Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-01-18Document the master@{n} reflog query syntax.Shawn O. Pearce
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 <> Signed-off-by: Junio C Hamano <>
2006-11-08Merge branch 'jc/pickaxe'Junio C Hamano
2006-10-31Introduce a new revision set operator <rev>^!Junio C Hamano
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 <>
2006-10-26Documentation: clarify refname disambiguation rules.Junio C Hamano
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 <>
2006-10-19Add revspec documentation for ':path', ':[0-3]:path' and
Signed-off-by: Nguyễn Thái Ngọc Duy <> Signed-off-by: Junio C Hamano <>
2006-10-03escape tilde in Documentation/git-rev-parse.txtJunio C Hamano
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 <> Acked-by: Stefan Richter <>
2006-07-07rev-parse documentation: talk about range notation.Junio C Hamano
Signed-off-by: Junio C Hamano <>
2006-06-04Merge branch 'sp/reflog'Junio C Hamano
* 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.
2006-06-04Documentation: Spelling fixesHorst H. von Brand
Signed-off-by: Horst H. von Brand <> Signed-off-by: Junio C Hamano <>
2006-05-19Change 'master@noon' syntax to 'master@{noon}'.Shawn Pearce
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 <> Signed-off-by: Junio C Hamano <>
2006-05-18Support 'master@2 hours ago' syntaxShawn Pearce
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 <> Signed-off-by: Junio C Hamano <>
2006-05-14Add "--branches", "--tags" and "--remotes" options to git-rev-parse.Sean
"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 <> Signed-off-by: Junio C Hamano <>
2006-03-09Remove trailing dot after short descriptionFredrik Kuivinen
Signed-off-by: Fredrik Kuivinen <> Signed-off-by: Junio C Hamano <>
2006-02-19Documentation: fix typo in rev-parse --short option description.Junio C Hamano
Signed-off-by: Junio C Hamano <>
2006-02-18Document --short and --git-dir in git-rev-parse(1)Jonas Fonseca
Signed-off-by: Jonas Fonseca <>
2005-12-23rev-parse: --show-cdupJunio C Hamano
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 <>
2005-11-03Illustration: "Commit DAG Revision Naming"Junio C Hamano
Jon Loeliger's ASCII art in the git-rev-parse(1) manual. Signed-off-by: Junio C Hamano <>
2005-11-03Document --since and --until options to rev-parse.Junio C Hamano
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 <>
2005-10-17ref-format documentation.Junio C Hamano
Signed-off-by: Junio C Hamano <>
2005-10-10Convert usage of GIT and Git into gitChristian Meder
Convert usage of GIT and Git into git. Signed-off-by: Christian Meder <> Signed-off-by: Junio C Hamano <>
2005-10-05Fix usage of carets in git-rev-parse(1)Jonas Fonseca
... but using a {caret} attribute. Signed-off-by: Jonas Fonseca <> Signed-off-by: Junio C Hamano <>
2005-09-20[PATCH] Documentation: Update all files to use the new gitlink: macroSergey Vlasov
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 <> Signed-off-by: Junio C Hamano <>
2005-09-18Arrgh -- another asciidoc caret workaround.Junio C Hamano
Signed-off-by: Junio C Hamano <>
2005-09-18Document extended SHA1 used by git-rev-parse.Junio C Hamano
Signed-off-by: Junio C Hamano <>
2005-09-07Documentation updates.Junio C Hamano
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 <>
2005-08-23Add placeholders for missing documents.Junio C Hamano
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 <>