From: Jan Hudec <bulb@ucw.cz>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Jonathan Watt <jwatt@jwatt.org>, Elijah Newren <newren@gmail.com>,
git@vger.kernel.org
Subject: Auto detaching head options (Re: Working copy revision and push pain)
Date: Tue, 25 Mar 2008 20:25:52 +0100 [thread overview]
Message-ID: <20080325192552.GC4857@efreet.light.src> (raw)
In-Reply-To: <alpine.LSU.1.00.0803231658460.4353@racer.site>
On Sun, Mar 23, 2008 at 17:00:12 +0100, Johannes Schindelin wrote:
> On Sun, 23 Mar 2008, Jonathan Watt wrote:
> > As I said, I don't want to update the files in the working copy. Seems
> > like a different issue to me.
>
> I understood that. *yawns*
>
> But I tried to tell you (unsuccessfully, it seems) that this is not
> desirable to all users, and therefore it would be a horrible, horrible
> idea to force the behaviour on other people you seemed to try to force on
> other people.
The proponents of this (and I also) think, that meaning of HEAD is, or rather
should be, "the revision your work tree is derived from". If you think it
should be defined otherwise, can you please say how, so the merits of the
definitions can be discussed?
Note, that that definition implies that HEAD makes no sense for bare
repository. I think HEAD indeed does not make sense there, but you may of
course provide different definition where it does.
Also I believe that it would be very useful to have a ref defined "the
revision your work tree is derived from", be it HEAD or not. It would:
- make the behaviour of push to non-bare repository defined.
- make additional work trees for a repository (created by
contrib/workdir/git-new-workdir) safe (the mechanizm could than be an
option for submodules).
I see two ways to add something to keep track of work tree base version:
1. Make HEAD a special kind of ref, that would contain *both* the symbolic
name *and* sha1. It would behave as symbolic as long as the sha1 values
match and as detached when they don't.
This should actually be relatively small code change, because it would be
confined to update-ref, symbolic-ref and revparse. It would however be
quite significant change to the repository format.
2. Create a new special ref BASE? (WORKTREE?), with the right semantics.
The code change would be a bit more invasive here, as more commands would
be affected (though I hope the commands share internal code so it would
only be one checkout and one commit path). It would be smaller change to
the repository format. It would, however, more stick out, because to find
out which branch you will commit to would require looking at both HEAD and
BASE.
It would really be similar to the revision number in index proposal,
except less invasive and I actually believe there is a case (some form of
checkout or reset), where we want to read-tree, but not change this ref.
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
next prev parent reply other threads:[~2008-03-25 19:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-23 12:39 Working copy revision and push pain Jonathan Watt
2008-03-23 13:02 ` Johannes Schindelin
2008-03-23 13:19 ` Jonathan Watt
2008-03-23 13:45 ` Elijah Newren
2008-03-23 13:54 ` Jonathan Watt
2008-03-23 14:06 ` Elijah Newren
2008-03-23 14:22 ` Johannes Schindelin
2008-03-23 14:48 ` Jonathan Watt
2008-03-23 14:56 ` Johannes Schindelin
2008-03-23 15:25 ` Jonathan Watt
2008-03-23 16:00 ` Johannes Schindelin
2008-03-25 19:25 ` Jan Hudec [this message]
2008-03-25 19:58 ` Auto detaching head options (Re: Working copy revision and push pain) Johannes Schindelin
2008-03-25 23:24 ` Jeff King
2008-03-26 18:49 ` Junio C Hamano
2008-03-29 8:27 ` Auto detaching head options (update) " Jan Hudec
2008-03-29 8:47 ` Jeff King
2008-03-31 1:53 ` Junio C Hamano
2008-03-31 1:59 ` Jeff King
2008-03-31 2:09 ` Jeff King
2008-03-23 19:48 ` Working copy revision and push pain Elijah Newren
2008-03-23 14:27 ` Jonathan Watt
2008-03-23 14:34 ` Johannes Schindelin
2008-03-23 16:20 ` Johan Herland
2008-03-23 17:24 ` Jonathan Watt
2008-03-23 18:21 ` Junio C Hamano
2008-03-23 19:42 ` Junio C Hamano
2008-03-23 18:23 ` Johannes Schindelin
2008-03-24 15:22 ` Johannes Schindelin
2008-03-24 18:00 ` Johan Herland
2008-03-23 14:11 ` Johannes Schindelin
2008-03-23 14:35 ` Jonathan Watt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080325192552.GC4857@efreet.light.src \
--to=bulb@ucw.cz \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jwatt@jwatt.org \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).