git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: git@vger.kernel.org
Cc: Mike Hommey <mh@glandium.org>, Johan Herland <johan@herland.net>,
	Michael Haggerty <mhagger@alum.mit.edu>,
	Jacob Keller <jacob.keller@gmail.com>
Subject: [PATCH 0/2] notes: allow read only notes actions on refs outside of refs/notes
Date: Wed, 16 Sep 2015 15:06:32 -0700	[thread overview]
Message-ID: <1442441194-5506-1-git-send-email-jacob.e.keller@intel.com> (raw)

From: Jacob Keller <jacob.keller@gmail.com>

The primary purpose of this series is to allow fetching remote notes
into a namespace such as "refs/remote-notes/<remote>/foo". Currently,
git-notes refuses to operate on refs outside of refs/notes/* including
merging from them, listing or showing them. This makes it difficult to
share notes from a remote repository.

Fix expand_notes_ref to not always prepend refs/notes to fully qualified
refs. Allow git-notes actions which do not specify NOTES_INIT_WRITABLE
to be performed on refs outside of refs/notes/*

Future work will include more coupling of "refs/remote-notes/<remote>"
into git-notes so that you can specify refs as "<remote>/foo" similar to
how remotes work for branches.

In addition, long term goal is to make it default to fetch notes into
refs/remote-notes/<remote>/*, and possibly to add some status for
tracking similar to how tracking branches work.

The one downside currently is that a test case for prevention of merge
from "refs/heads/master" had to be removed as "git notes merge
refs/heads/master" now works. I am not sure how this could be fixed.. I
did not find any way to tell if a treeish actually was a notes tree or
not...

This topic depends on mh/notes-allow-reading-treeish and actually
expands what this topic allowed before. Previously, treeishes such as
notes@{1} were made allowable, but the ref still had to be found under
refs/notes.

No documentation changes were made as from the looks of it,
documentation for --ref and core.notesRef is already correct despite the
previous behavior of expand_notes_ref. In that sense, documentation was
wrong before.

Jacob Keller (2):
  notes: don't expand qualified refs in expand_notes_ref
  notes: allow non-writable actions on refs outside of refs/notes

 builtin/notes.c        | 11 ++++++-----
 notes.c                |  4 ++--
 t/t3308-notes-merge.sh |  1 -
 3 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.6.0.rc2.248.g5b5be23

             reply	other threads:[~2015-09-16 22:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16 22:06 Jacob Keller [this message]
2015-09-16 22:06 ` [PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref Jacob Keller
2015-09-16 22:34   ` Junio C Hamano
2015-09-16 23:00     ` Jacob Keller
2015-09-22  6:50     ` Jacob Keller
2015-09-22 14:17       ` Junio C Hamano
2015-09-22 15:26         ` Jacob Keller
2015-09-22 17:54         ` Jacob Keller
2015-09-22 18:37           ` Junio C Hamano
2015-09-22 18:48             ` Jacob Keller
2015-09-16 22:06 ` [PATCH 2/2] notes: allow non-writable actions on refs outside of refs/notes Jacob Keller
2015-09-16 22:36 ` [PATCH 0/2] notes: allow read only notes " Mike Hommey
2015-09-16 23:01   ` Jacob Keller

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=1442441194-5506-1-git-send-email-jacob.e.keller@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.keller@gmail.com \
    --cc=johan@herland.net \
    --cc=mh@glandium.org \
    --cc=mhagger@alum.mit.edu \
    /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).