git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git Notes Usage
@ 2010-03-08 19:52 Scott Chacon
  2010-03-08 20:59 ` Michael J Gruber
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Chacon @ 2010-03-08 19:52 UTC (permalink / raw)
  To: git list

I've been trying to write up the git-notes functionality a bit and I'm
a tad confused about the remote workflow.  To share them, is it only
do-able by pushing via the full refspec (ie: 'git push origin
refs/notes/*:refs/notes/*')?  Likewise to fetch them from a server?
Also, if two people write notes into the same namespace at the
same time, how does one merge them?  Is the only way to do so to
actually checkout the notes branch into your working directory and
merge the notes trees?

Thanks,
Scott

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Git Notes Usage
  2010-03-08 19:52 Git Notes Usage Scott Chacon
@ 2010-03-08 20:59 ` Michael J Gruber
  2010-03-08 23:20   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Michael J Gruber @ 2010-03-08 20:59 UTC (permalink / raw)
  To: Scott Chacon; +Cc: git list

Scott Chacon venit, vidit, dixit 08.03.2010 20:52:
> I've been trying to write up the git-notes functionality a bit and I'm
> a tad confused about the remote workflow.  To share them, is it only
> do-able by pushing via the full refspec (ie: 'git push origin
> refs/notes/*:refs/notes/*')?  Likewise to fetch them from a server?

You can also write this into the config...
OK, seriously: I think for "typical usage" one stores others' notes in a
different place anyways, e.g. I store Thomas' list-notes in
refs/remotes/trast/notes/ so that they don't interfer with my own notes.

I don't think that teaching --notes to git push (a la --tags) with a
standard refspec would help in many cases.

> Also, if two people write notes into the same namespace at the
> same time, how does one merge them?  Is the only way to do so to
> actually checkout the notes branch into your working directory and
> merge the notes trees?

I'd say every merge needs a working directory, so, yes.

Michael

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Git Notes Usage
  2010-03-08 20:59 ` Michael J Gruber
@ 2010-03-08 23:20   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2010-03-08 23:20 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Scott Chacon, git list

Michael J Gruber <git@drmicha.warpmail.net> writes:

>> Also, if two people write notes into the same namespace at the
>> same time, how does one merge them?  Is the only way to do so to
>> actually checkout the notes branch into your working directory and
>> merge the notes trees?
>
> I'd say every merge needs a working directory, so, yes.

While that is true in the most general case, I do not necessarily agree
that people would use notes that way.

Merging two notes trees would require a lot more than the ordinary merge
machinery offers (there is a tree rebalancing logic in notes tree
mechanism, and notes specific merge that is yet to be written should take
advantage of it) and if one wants to do the merge manually, you would need
to check them out in a working tree.

The "notes copy" feature (parked in 'pu') lets you deal with conflicts by
allowing you to concatenate (or overwrite) while copying a note for commit
Y to another commit X and when X already has a note attached to it.  If
you think about it, it is merging an old note (that came from emptiness)
with a new note (that also came from emptiness) using an emptiness as
their common ancestor, i.e. two-tree merge with "union" merge semantics
(or "ours" if you say "overwrite", "theirs" if you say "ignore").

I suspect that in practice people would want notes to be resolved more
automatically and inclusively (read: union merge) compared to how the
normal payload would be merged, without the need to have a checkout in the
working tree.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-09 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-08 19:52 Git Notes Usage Scott Chacon
2010-03-08 20:59 ` Michael J Gruber
2010-03-08 23:20   ` Junio C Hamano

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).