# Isn't "dangling" a misnomer?

7 messages from 2007-02-26 to 2007-03-04. Participants: Mike Coleman, Johannes Schindelin, Junio C Hamano, Linus Torvalds, Yasushi SHOJI, Josef Sipek.
Thread: https://gitlist.dev/t/6974

## Mike Coleman, 2007-02-26 16:35

Subject: Isn't "dangling" a misnomer?
Message-ID: <3c6c07c20702260835v4865ace1u18a20f6b1d0030b5@mail.gmail.com>
URL: https://gitlist.dev/e/3c6c07c20702260835v4865ace1u18a20f6b1d0030b5%40mail.gmail.com

```
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, 2007-02-26 17:02

Subject: Re: Isn't "dangling" a misnomer?
Message-ID: <Pine.LNX.4.63.0702261801010.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702261801010.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <3c6c07c20702260835v4865ace1u18a20f6b1d0030b5@mail.gmail.com>

```
Hi,

On Mon, 26 Feb 2007, Mike Coleman wrote:

> 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, 2007-02-26 20:03

Subject: Re: Isn't "dangling" a misnomer?
Message-ID: <7virdolm8u.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7virdolm8u.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <3c6c07c20702260835v4865ace1u18a20f6b1d0030b5@mail.gmail.com>

```
"Mike Coleman" <tutufan@gmail.com> writes:

> 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, 2007-02-26 20:19

Subject: Re: Isn't "dangling" a misnomer?
Message-ID: <Pine.LNX.4.64.0702261216380.12485@woody.linux-foundation.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0702261216380.12485%40woody.linux-foundation.org
In-Reply-To: <7virdolm8u.fsf@assigned-by-dhcp.cox.net>

```


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, 2007-03-04 18:07

Subject: Add dangling object and unreachable object in glossary.txt
Message-ID: <87649g991s.wl@mail2.atmark-techno.com>
URL: https://gitlist.dev/e/87649g991s.wl%40mail2.atmark-techno.com
In-Reply-To: <Pine.LNX.4.64.0702261216380.12485@woody.linux-foundation.org>

```
---
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, 2007-03-04 19:03

Subject: Re: Add dangling object and unreachable object in glossary.txt
Message-ID: <20070304190322.GA3644@filer.fsl.cs.sunysb.edu>
URL: https://gitlist.dev/e/20070304190322.GA3644%40filer.fsl.cs.sunysb.edu
In-Reply-To: <87649g991s.wl@mail2.atmark-techno.com>

```
On Mon, Mar 05, 2007 at 03:07:43AM +0900, Yasushi SHOJI wrote:
> ---
> 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, 2007-03-04 21:27

Subject: Re: Add dangling object and unreachable object in glossary.txt
Message-ID: <7vvehg4s3b.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vvehg4s3b.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <87649g991s.wl@mail2.atmark-techno.com>

```
Yasushi SHOJI <yashi@atmark-techno.com> writes:

> @@ -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.

```
