Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Turner <dturner@twopensource.com>
Cc: git@vger.kernel.org, sunshine@sunshineco.com
Subject: Re: [PATCH v2] notes: handle multiple worktrees
Date: Fri, 31 Jul 2015 11:46:30 -0700	[thread overview]
Message-ID: <xmqq8u9w5fnd.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1438364697-6647-1-git-send-email-dturner@twopensource.com> (David Turner's message of "Fri, 31 Jul 2015 13:44:57 -0400")

David Turner <dturner@twopensource.com> writes:

> Before creating NOTES_MERGE_REF, check NOTES_MERGE_REF using
> die_if_shared_symref.  This prevents simultaneous merges to the same
> notes branch from different worktrees.
>
> Signed-off-by: David Turner <dturner@twopensource.com>
> ---
>
> This version addresses Eric Sunshine's critiques of v1.  It breaks out
> the symref-checking functionality into die_if_shared_symref, leaving
> die_if_checked_out to handle HEAD.

>
> ---
>  builtin/notes.c                  |  2 ++
>  t/t3320-notes-merge-worktrees.sh | 71 ++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 73 insertions(+)
>  create mode 100755 t/t3320-notes-merge-worktrees.sh

Hmm, is this the whole thing?

Or is a prerequisite patch to add that "symref check" infrastructure
missing on the receiving end?

This is a tangent, but there is a bigger spanner in "bisect".  It
uses refs/bisect/* to keep track of the current bisection state, but
that state is tied to a particular worktree, and it should not be
shared across other worktrees.

We need to reserve a part of refs/* hierarchy (e.g. refs/private/*)
for per worktree private stuff and handle them just like we do
per-worktree pseudorefs, or something like that.

  reply	other threads:[~2015-07-31 18:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 17:44 [PATCH v2] notes: handle multiple worktrees David Turner
2015-07-31 18:46 ` Junio C Hamano [this message]
2015-07-31 21:44   ` David Turner
2015-07-31 22:00     ` Junio C Hamano

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=xmqq8u9w5fnd.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=dturner@twopensource.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.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