threads / discuss / 6974

Isn't "dangling" a misnomer?

Subject: Isn't "dangling" a misnomer?

## tl;dr

7 messages between Feb 26, 2007 and Mar 4, 2007.

replies: 6people: 6as markdown or json

Mike Coleman· Feb 26, 2007, 16:35 UTC · lore

I've been reading and rereading the git documentation and tripping slightly over the word "dangling", as in "dangling object". In traditional use, one might talk of a dangling pointer A, where A points to B and B is destroyed/invalidated/etc. As a literal example, A might be a machine address like 0x8808FEFE, which points to an area of memory that once had a particular meaning, but now does not, leaving the pointer "dangling".

This way the git docs use this term seems to be the other way around---the object is still there and valid, but there are no pointers to it. In order for dangling to be going on, it seems like you'd have to have a SHA1 hash for an object that is no longer in the repository. (If there's been previous discussion of this, I couldn't find it.)

What about an alternative term like "orphaned" or "unreferenced"? The former is a bit more suggestive, but unfortunately might be confusing since the terms like ancestors, parents, etc., are already being used to talk about commit trees, which really is an orthogonal topic. The latter term seems like it would work, though it does sound a bit sterile.

Mike
Johannes Schindelin· Feb 26, 2007, 17:02 UTC · re: Mike Coleman · lore

Re: Isn't "dangling" a misnomer?

Hi,
On Mon, 26 Feb 2007, Mike Coleman wrote:
Show 7 quoted lines
> I've been reading and rereading the git documentation and tripping 
> slightly over the word "dangling", as in "dangling object".  In 
> traditional use, one might talk of a dangling pointer A, where A points 
> to B and B is destroyed/invalidated/etc.  As a literal example, A might 
> be a machine address like 0x8808FEFE, which points to an area of memory 
> that once had a particular meaning, but now does not, leaving the 
> pointer "dangling".

Think of the history as a large tree with branches. If a branch is dangling, it is about to be pruned.

Ciao, Dscho

Junio C Hamano· Feb 26, 2007, 20:03 UTC · re: Mike Coleman · lore

Re: Isn't "dangling" a misnomer?

"Mike Coleman" <tutufan@gmail.com> writes:
Show 6 quoted lines
> What about an alternative term like "orphaned" or "unreferenced"?  The
> former is a bit more suggestive, but unfortunately might be confusing
> since the terms like ancestors, parents, etc., are already being used
> to talk about commit trees, which really is an orthogonal topic.  The
> latter term seems like it would work, though it does sound a bit
> sterile.

We seem to use the word "unreachable" to refer to them. E.g. fsck and prune do "reachability analysis".

Linus Torvalds· Feb 26, 2007, 20:19 UTC · re: Junio C Hamano · lore

Re: Isn't "dangling" a misnomer?

On Mon, 26 Feb 2007, Junio C Hamano wrote:
> 
> We seem to use the word "unreachable" to refer to them.
> E.g. fsck and prune do "reachability analysis".

Well, everything that cannot be reached is "unreachable", but not everything is "dangling".

Being "dangling" is a very special case of unreachability: it's not reachable from _anything_ - including other unreachable objects.

So
	git fsck
will report about dangling objects, but
	git fsck --unreachable

will report about unreachable objects, and the result is *not* the same (dangling objects will usually be a very small subset of the unreachable ones, since in many cases *most* unreachable objects end up being pointed to by other unreachable objects, and are thus not the dangling part).

Maybe we could call the dangling objects "unreachable tips" or something. Because dangling => unreachable, but unreachable !=> dangling.

		Linus
Yasushi SHOJI· Mar 4, 2007, 18:07 UTC · re: Linus Torvalds · lore

Add dangling object and unreachable object in glossary.txt

--- Would it be worth to add these two entery in Documentation/glossary.txt?

English isn't my mother tang, so please check it.
-- 
         yashi



diff --git a/Documentation/glossary.txt b/Documentation/glossary.txt
index d20eb62..ee48009 100644
--- a/Documentation/glossary.txt
+++ b/Documentation/glossary.txt
@@ -73,6 +73,11 @@ DAG::
 	objects is acyclic (there is no chain which begins and ends with the
 	same object).
 
+dangling object::
+	An object which is a very special case of unreachable object;
+	it is not reachable from anything, including unreachable
+	objects.
+
 dircache::
 	You are *waaaaay* behind.
 
@@ -350,6 +355,9 @@ tag::
 unmerged index::
 	An index which contains unmerged index entries.
 
+unreachable object::
+	An object which is not reachable.
+
 working tree::
 	The set of files and directories currently being worked on,
 	i.e. you can work in your working tree without using git at all.
Josef Sipek· Mar 4, 2007, 19:03 UTC · re: Yasushi SHOJI · lore

Re: Add dangling object and unreachable object in glossary.txt

On Mon, Mar 05, 2007 at 03:07:43AM +0900, Yasushi SHOJI wrote:
Show 22 quoted lines
> ---
> Would it be worth to add these two entery in
> Documentation/glossary.txt?
> 
> English isn't my mother tang, so please check it.
> -- 
>          yashi
> 
> 
> 
> diff --git a/Documentation/glossary.txt b/Documentation/glossary.txt
> index d20eb62..ee48009 100644
> --- a/Documentation/glossary.txt
> +++ b/Documentation/glossary.txt
> @@ -73,6 +73,11 @@ DAG::
>  	objects is acyclic (there is no chain which begins and ends with the
>  	same object).
>  
> +dangling object::
> +	An object which is a very special case of unreachable object;
> +	it is not reachable from anything, including unreachable
> +	objects.
"...including other unreachable objects." ?
Josef "Jeff" Sipek.
-- 
Don't drink and derive. Alcohol and algebra don't mix.
Junio C Hamano· Mar 4, 2007, 21:27 UTC · re: Yasushi SHOJI · lore

Re: Add dangling object and unreachable object in glossary.txt

Yasushi SHOJI <yashi@atmark-techno.com> writes:
Show 7 quoted lines
> @@ -350,6 +355,9 @@ tag::
>  unmerged index::
>  	An index which contains unmerged index entries.
>  
> +unreachable object::
> +	An object which is not reachable.
> +
... from any ref.

← back to recent threads