git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Peter Karlsson <peter@softwolves.pp.se>,
	Lars Hjemli <hjemli@gmail.com>,
	Benoit SIGOURE <tsuna@lrde.epita.fr>
Subject: Re: Recording merges after repo conversion
Date: Wed, 31 Oct 2007 13:43:54 +0100	[thread overview]
Message-ID: <200710311343.58414.johan@herland.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0710311059020.4362@racer.site>

[-- Attachment #1: Type: text/plain, Size: 2531 bytes --]

On Wednesday 31 October 2007, Johannes Schindelin wrote:
> Hi,
> 
> On Wed, 31 Oct 2007, Peter Karlsson wrote:
> 
> > Johannes Schindelin:
> > 
> > > Why should it?  This would contradict the whole "a commit sha1 hashes 
> > > the commit, and by inference the _whole_ history" principle.
> > 
> > Does it?
> 
> Yes!  Of course!  If what you want becomes possible, I could make an evil 
> change in history long gone, and slip it by you.  You could not even see 
> the history which changed.

Well, technically, if the grafts file was part of the repo, you wouldn't be 
able to change the (in-tree) grafts file without affecting the SHA1 of HEAD. 
In other words, given a commit SHA1 sum, you can be sure that someone else 
who checks out the same commit (and has no local modification to their grafts 
file) will see exactly the same history as you do.

To a certain degree, this is actually "safer" than today's (out-of-tree) 
solution, where one can change the grafts file _without_ affecting the 
current HEAD (SHA1 sum), and thus will not see the same history as someone 
else who checks out the same HEAD. This is of course _intended_ to a certain 
degree by the current implementation, but can easily cause confusion if 
people lose track of what's in their respective grafts files.

Of course, this is both a blessing and a curse: Say, for example, we have 
three commits:

... --> A --> B --> C

and commit B changes the (in-tree) grafts file. Now if I have HEAD @ A, I will 
see a different history than if I have HEAD @ C. Worse: If one person has 
HEAD @ A, and another person has HEAD @ C, and neither is aware of the grafts 
file change in B, there is _plenty_ of room for getting confused if the two 
persons start discussing the repo history. Note, however, that similar 
confusement can be achieved today if one of the persons forgets having 
changed his out-of-tree grafts file


The grafts file concept is very powerful, but can also be extremely confusing. 
Adding in-tree versioning of the grafts file will make it more powerful 
(since we can now easily share and update "errata" to the repo history), but 
it might also make things _orders_of_magnitude_ more confusing (as 
demonstrated in the above example, although to be fair, similar confusement 
can be had in today's out-of-tree solution). At some point things may become 
so confusing that we'd rather drop the feature instead.


...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2007-10-31 12:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09  7:09 Recording merges after repo conversion Peter Karlsson
2007-10-09  7:19 ` Benoit SIGOURE
2007-10-30 13:34   ` Peter Karlsson
2007-10-30 14:29     ` Lars Hjemli
2007-10-30 21:06       ` Peter Karlsson
2007-10-30 21:46         ` Lars Hjemli
2007-10-31  2:28         ` Johannes Schindelin
2007-10-31  9:50           ` Peter Karlsson
2007-10-31 11:01             ` Johannes Schindelin
2007-10-31 12:07               ` Peter Karlsson
2007-10-31 12:32                 ` Johannes Schindelin
2007-10-31 12:43               ` Johan Herland [this message]
2007-10-31 13:43                 ` Johannes Schindelin
2007-10-31 14:37                   ` Johan Herland
2007-10-31 15:03                     ` Johannes Schindelin
2007-10-31 15:21                       ` Johan Herland
2007-10-31 15:57                         ` Johannes Schindelin
2007-10-31 16:43                           ` Linus Torvalds
2007-10-31 17:08                             ` Johan Herland
2007-10-30 15:05     ` Johannes Schindelin
2007-10-31 12:17       ` Peter Karlsson

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=200710311343.58414.johan@herland.net \
    --to=johan@herland.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=hjemli@gmail.com \
    --cc=peter@softwolves.pp.se \
    --cc=tsuna@lrde.epita.fr \
    /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).