# Re: [PATCH] New git-seek command with documentation and test.

5 messages from 2006-02-24 to 2006-02-24. Participants: linux@horizon.com, Johannes Schindelin, H. Peter Anvin, Andreas Ericsson.
Thread: https://gitlist.dev/t/3450

## linux@horizon.com, 2006-02-24 00:29

Subject: Re: [PATCH] New git-seek command with documentation and test.
Message-ID: <20060224002915.17331.qmail@science.horizon.com>
URL: https://gitlist.dev/e/20060224002915.17331.qmail%40science.horizon.com

```
The annoying thing about temporary branch names like "bisect" and "seek"
is that:
a) They clutter up the nae space available to the repository user.
   Users have to know that those are reserved names.
b) If a repository is cloned while they're in use, they might get
   into a "remotes" file, with even more confusing results.

This is somewhat heretical, but how about making a truly unnamed branch by
having .git/HEAD *not* be a symlink, but rather hold a commit ID directly?
It's already well established that files in the .git directory directly
are strictly local to this working directory, so it seems a much better
home for such temporary state.

Admittedly, this requires more invasive edits (particularly adding a third
legitimate case to validate_symref()), but it seems to make more sense.
And be ultimately simpler than workarounds for the above problems.

Just loosen the rules from ".git/HEAD must be a symlink" to
".git/HEAD must be a symlink before you can check in".


Yes, I know it's radical.  At least I'm not questioning the
power and efficacy of indulgences.  :-)

```

## Johannes Schindelin, 2006-02-24 00:54

Subject: Re: [PATCH] New git-seek command with documentation and test.
Message-ID: <Pine.LNX.4.63.0602240152490.32472@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0602240152490.32472%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <20060224002915.17331.qmail@science.horizon.com>

```
Hi,

On Fri, 23 Feb 2006, linux@horizon.com wrote:

> This is somewhat heretical, but how about making a truly unnamed branch by
> having .git/HEAD *not* be a symlink, but rather hold a commit ID directly?

Not heretical. How do you intend to switch branches now? And how do you 
intend to record the starting point of git-seek to which you want to 
return to? All leads back to .git/HEAD pointing to a branch (or whatever 
you want to call it). And BTW, .git/HEAD is no symlink these days, but a 
symref.

Hth,
Dscho

```

## linux@horizon.com, 2006-02-24 01:23

Subject: Re: [PATCH] New git-seek command with documentation and test.
Message-ID: <20060224012312.25603.qmail@science.horizon.com>
URL: https://gitlist.dev/e/20060224012312.25603.qmail%40science.horizon.com
In-Reply-To: <Pine.LNX.4.63.0602240152490.32472@wbgn013.biozentrum.uni-wuerzburg.de>

```
> Not heretical. How do you intend to switch branches now?

Point .git/HEAD at the branch like usual.
.git/HEAD would not be a symref *only* when on the unnamed temporary
branch (which doesn't accept commits).

> And how do you intend to record the starting point of git-seek to
> which you want to return to?

Te same way it's done now for git-seek or git-bisect: by copying the
old HEAD to a temporary location like .git/head-name.

> All leads back to .git/HEAD pointing to a branch (or whatever 
> you want to call it).

In the usual case, yes it should.  Any time you want to be able to
develop on a branch, you need .git/HEAD pointing to a branch.
You only make it point to a commit directly is when exploring the
history with no intention of developing from it.

(Note that you can easily change your mind with a simple
"git checkout -b <branch>".)

> And BTW, .git/HEAD is no symlink these days, but a symref.

Yes, I'm sorry; I was just being lazy with my terminology.

```

## H. Peter Anvin, 2006-02-24 06:53

Subject: Re: [PATCH] New git-seek command with documentation and test.
Message-ID: <43FEAD62.6050302@zytor.com>
URL: https://gitlist.dev/e/43FEAD62.6050302%40zytor.com
In-Reply-To: <20060224002915.17331.qmail@science.horizon.com>

```
linux@horizon.com wrote:
> The annoying thing about temporary branch names like "bisect" and "seek"
> is that:
> a) They clutter up the nae space available to the repository user.
>    Users have to know that those are reserved names.
> b) If a repository is cloned while they're in use, they might get
>    into a "remotes" file, with even more confusing results.
> 
> This is somewhat heretical, but how about making a truly unnamed branch by
> having .git/HEAD *not* be a symlink, but rather hold a commit ID directly?
> It's already well established that files in the .git directory directly
> are strictly local to this working directory, so it seems a much better
> home for such temporary state.
> 

It might be easier to just reserve part of the namespace, e.g. ".bisect" 
and ".seek" instead.

	-hpa

```

## Andreas Ericsson, 2006-02-24 10:11

Subject: Re: [PATCH] New git-seek command with documentation and test.
Message-ID: <43FEDBE4.8040200@op5.se>
URL: https://gitlist.dev/e/43FEDBE4.8040200%40op5.se
In-Reply-To: <43FEAD62.6050302@zytor.com>

```
H. Peter Anvin wrote:
> linux@horizon.com wrote:
> 
>> The annoying thing about temporary branch names like "bisect" and "seek"
>> is that:
>> a) They clutter up the nae space available to the repository user.
>>    Users have to know that those are reserved names.
>> b) If a repository is cloned while they're in use, they might get
>>    into a "remotes" file, with even more confusing results.
>>
>> This is somewhat heretical, but how about making a truly unnamed 
>> branch by
>> having .git/HEAD *not* be a symlink, but rather hold a commit ID 
>> directly?
>> It's already well established that files in the .git directory directly
>> are strictly local to this working directory, so it seems a much better
>> home for such temporary state.
>>
> 
> It might be easier to just reserve part of the namespace, e.g. ".bisect" 
> and ".seek" instead.
> 

Ach, no. Not specific names. ^\.-.* would be acceptable, but I sometimes 
use '.name' or '-name' to mark a temporary branch. Making .- or some 
such reserved would perhaps make sense, but not with specific names.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

```
