git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johan Herland <johan@herland.net>
To: Francis Moreau <francis.moro@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Notes and submodules
Date: Mon, 19 Aug 2013 15:55:56 +0200	[thread overview]
Message-ID: <CALKQrgfGUMrcR+EPTvN9+mFPcW6Q-zv1JM6MJK-61BvF3yYpbQ@mail.gmail.com> (raw)
In-Reply-To: <CAC9WiBj-ij1o6JL-FtUuCgdf8ZqrhJb2=dQcSXjRMEwwL4VWFA@mail.gmail.com>

On Mon, Aug 19, 2013 at 10:13 AM, Francis Moreau <francis.moro@gmail.com> wrote:
> Hello,
>
> Is it possible to keep submodules notes in the super project  ?

Not easily. I guess it depends on what you want to use the notes for.
In order for notes to be generally useful (i.e. show up in logs,
surviving a notes prune, etc.) they really must reside in the same
repo as the annotated objects [1]. Now, if all your interaction with
notes happens through scripts that you control, then I guess it would
be possible to hack this in some sort of semi-workable way, but you
would still have to make sure never to run "git notes prune" in the
super project. I guess the real question here is: Why would you want
to do this? and is there maybe some other way your use case can be
accomodated?

...Johan

[1]: If you were to annotate objects in a submodule, but then store
the notes objects in the super project, it would be impossible for
"git log" in the submodule to find the notes objects, and your log
would show no notes. Similarly, a "git log" in the super project would
see a lot of notes objects pointing to non-existing objects (because
those objects live in the submodule), hence the notes objects would be
removed when running "git notes prune" in the super project.

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

  reply	other threads:[~2013-08-19 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19  8:13 Notes and submodules Francis Moreau
2013-08-19 13:55 ` Johan Herland [this message]
2013-08-20  8:39   ` Francis Moreau
2013-08-20  9:41     ` Johan Herland

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=CALKQrgfGUMrcR+EPTvN9+mFPcW6Q-zv1JM6MJK-61BvF3yYpbQ@mail.gmail.com \
    --to=johan@herland.net \
    --cc=francis.moro@gmail.com \
    --cc=git@vger.kernel.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).