git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org
Subject: Re: Allowing weak references to blobs and strong references to commits
Date: Tue, 31 Mar 2015 13:23:23 -0700	[thread overview]
Message-ID: <xmqq8uecrk5g.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150331100756.GA13377@glandium.org> (Mike Hommey's message of "Tue, 31 Mar 2015 19:07:56 +0900")

Mike Hommey <mh@glandium.org> writes:

> So I thought, since commits are already allowed in tree objects, for
> submodules, why not add a bit to the mode that would tell git that
> those commit object references are meant to always be there aka strong
> reference, as opposed to the current weak references for submodules.

Unless you are recording the paths to these "commits" to be
potentially checked out on the filesystem, do not put them in a
"tree".  The entries in a tree object represent "This thing go to
this path in the working tree".

It is not clear to me (and because you said "I won't bother you with
all the whys and hows", I am guessing that it is OK for readers to
be unclear), but I think you only want to make sure "git fetch" and
"git push" transfers these objects, the graph formed by which is
*not* any part of the main history of the project.  It is perfectly
OK to represent these objects as a special purpose history and have
a ref point at its tip.  The "notes" database is represented that
way, for example.  And I do not see anything wrong to use octopus
merges in the history if you want to represent "here are the commit
objects that I care about at this point in the 'special purpose'
history (not the main history)".

  parent reply	other threads:[~2015-03-31 20:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 10:07 Allowing weak references to blobs and strong references to commits Mike Hommey
2015-03-31 19:55 ` Philip Oakley
2015-03-31 21:08   ` Randall S. Becker
2015-03-31 20:23 ` Junio C Hamano [this message]
2015-03-31 22:39   ` Mike Hommey
2015-03-31 23:00     ` Junio C Hamano
2015-03-31 23:14     ` Jonathan Nieder
2015-03-31 23:18       ` Jonathan Nieder
2015-03-31 23:25       ` Junio C Hamano
2015-03-31 23:35       ` Mike Hommey

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8uecrk5g.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).