Skip to contentSkip to conversation

glossary: clean up cross-references

PATCH New J. Bruce Fields 3 participants 9 messages Jun 15, 2016 6 messages not in the archive Documentation

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 117427428145-git-send-email-

A message that is not in the archive (sent off-list or not yet received): 1174274281887-git-send-email-

A message that is not in the archive (sent off-list or not yet received): 11742742813855-git-send-email-

A message that is not in the archive (sent off-list or not yet received): 1174274281258-git-send-email-

A message that is not in the archive (sent off-list or not yet received): 11742742811304-git-send-email-

A message that is not in the archive (sent off-list or not yet received): 11742742812465-git-send-email-

#6 lore raw

PATCH 1/1 user-manual: introduce "branch" and "branch head" differently

From: J. Bruce Fields <[email protected]>

I was using "branch" to mean "head", but that's perhaps a little sloppy; so instead start by using the terms "branch head" and "head", while still quickly falling back on "branch", since that's what people actually say more frequently.

Also include glossary references on the first uses of "head" and "tag".

---
 Documentation/user-manual.txt |   43 ++++++++++++++++++++---------------------
 1 files changed, 21 insertions(+), 22 deletions(-)
Documentation/user-manual.txt +21 -22
index 6df5e61..3ed9f84 100644
@@ -288,21 +288,22 @@ collection of files.  It stores the history as a compressed
 collection of interrelated snapshots (versions) of the project's
 contents.
 
-A single git repository may contain multiple branches.  Each branch
-is a bookmark referencing a particular point in the project history.
-The gitlink:git-branch[1] command shows you the list of branches:
+A single git repository may contain multiple branches.  It keeps track
+of them by keeping a list of <<def_head,heads>> which reference the
+latest version on each branch; the gitlink:git-branch[1] command shows
+you the list of branch heads:
 
 ------------------------------------------------
 $ git branch
 * master
 ------------------------------------------------
 
-A freshly cloned repository contains a single branch, named "master",
-and the working directory contains the version of the project
-referred to by the master branch.
+A freshly cloned repository contains a single branch head, named
+"master", and working directory is initialized to the state of
+the project referred to by "master".
 
-Most projects also use tags.  Tags, like branches, are references
-into the project's history, and can be listed using the
+Most projects also use <<def_tag,tags>>.  Tags, like heads, are
+references into the project's history, and can be listed using the
 gitlink:git-tag[1] command:
 
 ------------------------------------------------
@@ -320,9 +321,9 @@ v2.6.13
 ------------------------------------------------
 
 Tags are expected to always point at the same version of a project,
-while branches are expected to advance as development progresses.
+while heads are expected to advance as development progresses.
 
-Create a new branch pointing to one of these versions and check it
+Create a new branch head pointing to one of these versions and check it
 out using gitlink:git-checkout[1]:
 
 ------------------------------------------------
@@ -346,10 +347,10 @@ the current branch to point at v2.6.17 instead, with
 $ git reset --hard v2.6.17
 ------------------------------------------------
 
-Note that if the current branch was your only reference to a
+Note that if the current branch head was your only reference to a
 particular point in history, then resetting that branch may leave you
-with no way to find the history it used to point to; so use this
-command carefully.
+with no way to find the history it used to point to; so use this command
+carefully.
 
 Understanding History: Commits
 ------------------------------
@@ -452,17 +453,15 @@ be replaced with another letter or number.
 Understanding history: What is a branch?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Though we've been using the word "branch" to mean a kind of reference
-to a particular commit, the word branch is also commonly used to
-refer to the line of commits leading up to that point.  In the
-example above, git may think of the branch named "A" as just a
-pointer to one particular commit, but we may refer informally to the
-line of three commits leading up to that point as all being part of
+When we need to be precise, we will use the word "branch" to mean a line
+of development, and "branch head" (or just "head") to mean a reference
+to the most recent commit on a branch.  In the example above, the branch
+head named "A" is a pointer to one particular commit, but we refer to
+the line of three commits leading up to that point as all being part of
 "branch A".
 
-If we need to make it clear that we're just talking about the most
-recent commit on the branch, we may refer to that commit as the
-"head" of the branch.
+However, when no confusion will result, we often just use the term
+"branch" both for branches and for branch heads.
 
 Manipulating branches
 ---------------------
Signature · 1 line
1.5.0.3.31.ge47c
#7 lore raw

PATCH 1/1 glossary: clean up cross-references

In reply to a message not in the archive

From: J. Bruce Fields <[email protected]>

Manual clean-up of cross-references, and also clean up a few definitions (e.g. git-rebase).

---
 Documentation/glossary.txt |   58 ++++++++++++++++++++++----------------------
 1 files changed, 29 insertions(+), 29 deletions(-)
Documentation/glossary.txt +29 -29
index 82e17db..2465514 100644
@@ -13,7 +13,7 @@ GIT Glossary
 	<<def_revision,revision>> control. That is, all of the `git`
 	administrative and control files that would normally be present in the
 	hidden `.git` sub-directory are directly present in the
-	`<<def_repository,repository>>.git` <<def_directory,directory>> instead,
+	`repository.git` directory instead,
 	and no other files are present and checked out. Usually publishers of
 	public repositories make bare repositories available.
 
@@ -23,7 +23,7 @@ GIT Glossary
 [[def_branch]]branch::
 	A non-cyclical graph of revisions, i.e. the complete history of a
 	particular <<def_revision,revision>>, which is called the
-	<<def_branch,branch>> <<def_head,head>>. The <<def_branch,branch>> heads
+	branch <<def_head,head>>. The heads
 	are stored in `$GIT_DIR/refs/heads/`.
 
 [[def_cache]]cache::
@@ -133,7 +133,7 @@ GIT Glossary
 	together by recording fake ancestry information for commits. This way
 	you can make git pretend the set of parents a <<def_commit,commit>> has
 	is different from what was recorded when the <<def_commit,commit>> was
-	created. Configured via the `.git/info/<<def_grafts,grafts>>` file.
+	created. Configured via the `.git/info/grafts` file.
 
 [[def_hash]]hash::
 	In git's context, synonym to <<def_object_name,object name>>.
@@ -205,7 +205,7 @@ GIT Glossary
 
 [[def_object_type]]object type::
 	One of the identifiers
-	"<<def_commit,commit>>","<<def_tree,tree>>","<<def_tag,tag>>" and "blob"
+	"<<def_commit,commit>>","<<def_tree,tree>>","<<def_tag,tag>>" or "<<def_blob_object,blob>>"
 	describing the type of an <<def_object,object>>.
 
 [[def_octopus]]octopus::
@@ -217,7 +217,7 @@ GIT Glossary
 	at least one upstream project which they track. By default
 	'<<def_origin,origin>>' is used for that purpose. New upstream updates
 	will be fetched into remote tracking branches named
-	<<def_origin,origin>>/name-of-upstream-branch, which you can see using
+	origin/name-of-upstream-branch, which you can see using
 	"git <<def_branch,branch>> -r".
 
 [[def_pack]]pack::
@@ -271,14 +271,15 @@ GIT Glossary
 	<<def_reachable,reachable>> from that <<def_commit,commit>>. More
 	generally, one <<def_object,object>> is <<def_reachable,reachable>> from
 	another if we can reach the one from the other by a <<def_chain,chain>>
-	that follows tags to whatever they <<def_tag,tag>>, commits to their
-	parents or trees, and trees to the trees or blobs that they contain.
+	that follows <<def_tag,tags>> to whatever they tag,
+	<<def_commit_object,commits>> to their parents or trees, and
+	<<def_tree_object,trees>> to the trees or <<def_blob_object,blobs>>
+	that they contain.
 
 [[def_rebase]]rebase::
-	To <<def_clean,clean>> a <<def_branch,branch>> by starting from the
-	<<def_head,head>> of the main line of development
-	("<<def_master,master>>"), and reapply the (possibly cherry-picked)
-	changes from that <<def_branch,branch>>.
+	To reapply a series of changes from a <<def_branch,branch>> to a
+	different base, and reset the <<def_head,head>> of that branch
+	to the result.
 
 [[def_ref]]ref::
 	A 40-byte hex representation of a <<def_SHA1,SHA1>> or a name that
@@ -290,19 +291,18 @@ GIT Glossary
 	<<def_push,push>> to describe the mapping between remote <<def_ref,ref>>
 	and local <<def_ref,ref>>. They are combined with a colon in the format
 	<src>:<dst>, preceded by an optional plus sign, +. For example: `git
-	<<def_fetch,fetch>> $URL
-	refs/heads/<<def_master,master>>:refs/heads/<<def_origin,origin>>` means
-	"grab the <<def_master,master>> <<def_branch,branch>> <<def_head,head>>
-	from the $URL and store it as my <<def_origin,origin>>
+	fetch $URL refs/heads/master:refs/heads/origin` means
+	"grab the master <<def_branch,branch>> <<def_head,head>>
+	from the $URL and store it as my origin
 	<<def_branch,branch>> <<def_head,head>>". And `git <<def_push,push>>
-	$URL refs/heads/<<def_master,master>>:refs/heads/to-upstream` means
-	"publish my <<def_master,master>> <<def_branch,branch>>
+	$URL refs/heads/master:refs/heads/to-upstream` means
+	"publish my master <<def_branch,branch>>
 	<<def_head,head>> as to-upstream <<def_branch,branch>> at $URL". See
 	also gitlink:git-push[1]
 
 [[def_repository]]repository::
 	A collection of refs together with an <<def_object_database,object
-	database>> containing all objects, which are <<def_reachable,reachable>>
+	database>> containing all objects which are <<def_reachable,reachable>>
 	from the refs, possibly accompanied by meta data from one or more
 	porcelains. A <<def_repository,repository>> can share an
 	<<def_object_database,object database>> with other repositories.
@@ -334,12 +334,12 @@ GIT Glossary
 	object>>). This is sometimes useful when you are interested only in the
 	recent history of a project even though the real history recorded in the
 	upstream is much larger. A <<def_shallow_repository,shallow repository>>
-	is created by giving `--depth` option to gitlink:git-clone[1], and its
-	history can be later deepened with gitlink:git-fetch[1].
+	is created by giving the `--depth` option to gitlink:git-clone[1], and
+	its history can be later deepened with gitlink:git-fetch[1].
 
 [[def_symref]]symref::
 	Symbolic reference: instead of containing the <<def_SHA1,SHA1>> id
-	itself, it is of the format '<<def_ref,ref>>: refs/some/thing' and when
+	itself, it is of the format 'ref: refs/some/thing' and when
 	referenced, it recursively dereferences to this reference. 'HEAD' is a
 	prime example of a <<def_symref,symref>>. Symbolic references are
 	manipulated with the gitlink:git-symbolic-ref[1] command.
@@ -347,11 +347,11 @@ GIT Glossary
 [[def_tag]]tag::
 	A <<def_ref,ref>> pointing to a <<def_tag,tag>> or
 	<<def_commit_object,commit object>>. In contrast to a <<def_head,head>>,
-	a <<def_tag,tag>> is not changed by a <<def_commit,commit>>. Tags (not
-	<<def_tag,tag>> objects) are stored in `$GIT_DIR/refs/tags/`. A git
-	<<def_tag,tag>> has nothing to do with a Lisp <<def_tag,tag>> (which is
-	called <<def_object_type,object type>> in git's context). A
-	<<def_tag,tag>> is most typically used to mark a particular point in the
+	a tag is not changed by a <<def_commit,commit>>. Tags (not
+	<<def_tag_object,tag objects>>) are stored in `$GIT_DIR/refs/tags/`. A
+	git tag has nothing to do with a Lisp tag (which would be
+	called an <<def_object_type,object type>> in git's context). A
+	tag is most typically used to mark a particular point in the
 	<<def_commit,commit>> ancestry <<def_chain,chain>>.
 
 [[def_tag_object]]tag object::
@@ -383,7 +383,7 @@ GIT Glossary
 
 [[def_tree_object]]tree object::
 	An <<def_object,object>> containing a list of file names and modes along
-	with refs to the associated blob and/or <<def_tree,tree>> objects. A
+	with refs to the associated blob and/or tree objects. A
 	<<def_tree,tree>> is equivalent to a <<def_directory,directory>>.
 
 [[def_tree-ish]]tree-ish::
@@ -393,8 +393,8 @@ GIT Glossary
 	<<def_tree_object,tree object>>.
 
 [[def_unmerged_index]]unmerged index::
-	An <<def_index,index>> which contains <<def_unmerged_index,unmerged
-	index>> entries.
+	An <<def_index,index>> which contains unmerged
+	<<def_index_entry,index entries>>.
 
 [[def_unreachable_object]]unreachable object::
 	An <<def_object,object>> which is not <<def_reachable,reachable>> from a
Signature · 1 line
1.5.0.3.31.ge47c
#8 lore raw

Re: [PATCH] glossary: stop generating automatically

In reply to a message not in the archive
Quoted 8 lines · J. Bruce Fields

From: J. Bruce Fields <[email protected]>

The sort_glossary.pl script sorts the glossary, checks for duplicates, and automatically adds cross-references.

But it's not so hard to do all that by hand, and sometimes the automatic cross-references are a little wrong; so let's run the script one last time and check in its output.

This initially raised my eyebrow but after looking at the next patch, I tend to agree why automated stuff needs to be lot better, or we forget about automation and maintain that by hand.

Dscho, preference?

#9 lore raw

Re: [PATCH] glossary: stop generating automatically

Hi,

Quoted 11 lines · Junio C Hamano
Quoted 8 lines · J. Bruce Fields

From: J. Bruce Fields <[email protected]>

The sort_glossary.pl script sorts the glossary, checks for duplicates, and automatically adds cross-references.

But it's not so hard to do all that by hand, and sometimes the automatic cross-references are a little wrong; so let's run the script one last time and check in its output.

Quoted 6 lines

This initially raised my eyebrow but after looking at the next patch, I tend to agree why automated stuff needs to be lot better, or we forget about automation and maintain that by hand.

Dscho, preference?

None at the moment. I am deeply involved in a project, and have next to no cycles to spend on Git, let alone documentation :-(

Ciao,
Dscho

#10 lore raw

Re: [PATCH] glossary: stop generating automatically

In reply to a message not in the archive

Hi,

Quoted 3 lines · J. Bruce Fields

Note: to make the output fit better into the user manual I also deleted the acknowledgements at the end, which was maybe a little rude; feel free to object and I can find a different solution.

Fine with me.

Ciao,
Dscho

#11 lore raw

PATCH 1/1 glossary: stop generating automatically

In reply to a message not in the archive

From: J. Bruce Fields <[email protected]>

The sort_glossary.pl script sorts the glossary, checks for duplicates, and automatically adds cross-references.

But it's not so hard to do all that by hand, and sometimes the automatic cross-references are a little wrong; so let's run the script one last time and check in its output.

Note: to make the output fit better into the user manual I also deleted the acknowledgements at the end, which was maybe a little rude; feel free to object and I can find a different solution.

Cc Johannes Schindelin <[email protected]>
---
 Documentation/Makefile         |    8 +-
 Documentation/glossary.txt     |  740 +++++++++++++++++++++-------------------
 Documentation/sort_glossary.pl |   69 ----
 Documentation/user-manual.txt  |    3 -
 4 files changed, 392 insertions(+), 428 deletions(-)
 delete mode 100644 Documentation/sort_glossary.pl
Documentation/Makefile +2 -6
index 48d41c5..7db3fb9 100644
@@ -16,8 +16,9 @@ ARTICLES += repository-layout
 ARTICLES += hooks
 ARTICLES += everyday
 ARTICLES += git-tools
+ARTICLES += glossary
 # with their own formatting rules.
-SP_ARTICLES = glossary howto/revert-branch-rebase user-manual
+SP_ARTICLES = howto/revert-branch-rebase user-manual
 
 DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
 
@@ -111,11 +112,6 @@ XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
 user-manual.html: user-manual.xml
 	xsltproc $(XSLTOPTS) -o $@ $(XSLT) $<
 
-glossary.html : glossary.txt sort_glossary.pl
-	cat $< | \
-	perl sort_glossary.pl | \
-	$(ASCIIDOC) -b xhtml11 - > glossary.html
-
 howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
 	rm -f $@+ $@
 	sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
Documentation/glossary.txt +390 -350

755 lines not on this page · raw message

Documentation/sort_glossary.pl deleted +0 -69

69 lines not on this page · raw message

Documentation/user-manual.txt +0 -3
index 773f65e..6df5e61 100644
@@ -3013,9 +3013,6 @@ confusing and scary messages, but it won't actually do anything bad. In
 contrast, running "git prune" while somebody is actively changing the 
 repository is a *BAD* idea).
 
-Glossary of git terms
-=====================
-
 include::glossary.txt[]
 
 Notes and todo list for this manual
Signature · 1 line
1.5.0.3.31.ge47c
#12 lore raw

PATCH 1/1 user-manual: Use def_ instead of ref_ for glossary references.

In reply to a message not in the archive

From: J. Bruce Fields <[email protected]>

I'd like to start using references to the glossary in the user manual. The "ref_" prefix for these references seems a little generic; so replace with "def_".

---
 Documentation/sort_glossary.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/sort_glossary.pl +2 -2
index 05dc7b2..4ae6290 100644
@@ -50,8 +50,8 @@ This list is sorted alphabetically:
 @keys=sort {uc($a) cmp uc($b)} keys %terms;
 $pattern='(\b(?<!link:git-)'.join('\b|\b(?<!-)',reverse @keys).'\b)';
 foreach $key (@keys) {
-	$terms{$key}=~s/$pattern/sprintf "<<ref_".no_spaces($1).",$1>>";/eg;
-	print '[[ref_'.no_spaces($key).']]'.$key."::\n"
+	$terms{$key}=~s/$pattern/sprintf "<<def_".no_spaces($1).",$1>>";/eg;
+	print '[[def_'.no_spaces($key).']]'.$key."::\n"
 		.format_tab_80($terms{$key})."\n";
 }
 
Signature · 1 line
1.5.0.3.31.ge47c
#13 lore raw

PATCH 1/1 user-manual.txt: fix a tiny typo.

In reply to a message not in the archive

From: Jim Meyering <[email protected]>

"file patch" was doubtless intended to be "file path", but "directory name" is clearer.

---
 Documentation/user-manual.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/user-manual.txt +1 -1
index 0919574..773f65e 100644
@@ -1698,7 +1698,7 @@ If you and maintainer both have accounts on the same machine, then
 then you can just pull changes from each other's repositories
 directly; note that all of the commands (gitlink:git-clone[1],
 git-fetch[1], git-pull[1], etc.) that accept a URL as an argument
-will also accept a local file patch; so, for example, you can
+will also accept a local directory name; so, for example, you can
 use
 
 -------------------------------------------------
Signature · 1 line
1.5.0.3.31.ge47c
#14 lore raw

PATCH 1/1 user-manual: run xsltproc without --nonet option

In reply to a message not in the archive

From: J. Bruce Fields <[email protected]>

The --nonet option prevents xsltproc from going to the network to find anything. But it always tries to find them locally first, so for a user with the necessary docbook stylesheets installed the build will work just fine without xsltproc attempting to use the network; all --nonet does is make it fail rather than falling back on that. That doesn't seem particularly helpful.

---
 Documentation/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/Makefile +1 -1
index 7c1c9e1..48d41c5 100644
@@ -106,7 +106,7 @@ user-manual.xml: user-manual.txt user-manual.conf
 	$(ASCIIDOC) -b docbook -d book $<
 
 XSLT = http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
-XSLTOPTS = --nonet --xinclude --stringparam html.stylesheet docbook-xsl.css
+XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
 
 user-manual.html: user-manual.xml
 	xsltproc $(XSLTOPTS) -o $@ $(XSLT) $<
Signature · 1 line
1.5.0.3.31.ge47c