All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Bryan Turner <bturner@atlassian.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Philip Oakley <philipoakley@iee.org>,
	rsbecker@nexbridge.com, Eric Kulcyk <Eric.kulcyk@microsoft.com>,
	Git Users <git@vger.kernel.org>
Subject: Re: Tracking parent branches in Git
Date: Tue, 2 Jul 2019 15:24:12 -0400	[thread overview]
Message-ID: <20190702192412.GE3032@mit.edu> (raw)
In-Reply-To: <CAGyf7-GhD50Dy0O7JjV4vTyQfFcifyKzeYDS_HtAXy604HxqVQ@mail.gmail.com>

On Tue, Jul 02, 2019 at 11:52:35AM -0700, Bryan Turner wrote:
> Sorry, I should have clarified my "--no-track" in my original message
> when I provided the example. I did "--no-track" because if I push
> "bturner-some-bugfix" to a server, I'm likely going to do something
> like "git push -u origin bturner-some-bugfix" so that my local
> "bturner-some-bugfix" branch will track the remote version of itself.
> At that point, the remote-tracking information would change from
> "release/5.16" to "bturner-some-bugfix" (without any sort of warning,
> for whatever that's worth), effectively "losing" the ancestry.
> 
> The other issue is that my local remote-tracking information doesn't
> help the server I'm talking to; it's not shareable. Assuming I could
> use remote-tracking to track ancestry, there's still no way to
> communicate that to the server so that it could know, when I go to
> create a pull request for "bturner-some-bugfix", that it's tracking
> "release/5.16" in my local repository.

I think the real problem with all of this feature request is that it's
all presuming a particular workflow, and git is currently *not*
strongly opinionated about the workflow.

So for example, if I create a local branch against origin/release/5.16
with a series of fixes, and I'm pushing to a gerrit server for review,
I might need to do something like this:

  git push gerrit HEAD:refs/for/release/5.16%r=reviewer@example.com,%cc=kernel-reviewers@example.com

So the fact that we've recorded the information about the parent
branch when doing a "git checkout -b bugfix origin/release/5.16" is
part of the puzzle, but the other part of the puzzle is knowing what
the destination server is going to want or need.  Internally at $WORK
we have our own internal script that does this automatically, so I
just have to run something like "kdt mail -r reviewer@example.com",
but it's always going to be very workflow-independent.

> I could certainly be misunderstanding the request, but I think it's
> asking for something less ephemeral--and more shareable--than
> remote-tracking, and it seems logical to want to be able to retain
> ancestry while still using remote-tracking setup such that local
> branches still track the remote version of themselves, rather than
> some other (albeit related) branch.

In order for it to be shareable, we have to make some very strong
assumptions about workflow.  It gets worse when people pull from more
than one tree, or there is a series of subtrees.

For example, suppose the 2nd-level lieutenant has a "net" tree, and
the 3rd-level lieutenants have a "sctp" and a "ipsec" tree.  Now let's
assume that there is some common infrastructure branch that both
3rd-level lieutenants need to build off of that comes from some other
2nd-level tree, and so for that development cycle, they first pull
from the top-level tree, and then both 3rd level trees merge in a
branch from the "mm" tree, but then they will be both be sending pull
request emails to the "net" tree.

There will be a whole series of git pulls and git merges that will be
in flight, and just for yucks, let's suppose some trees are do patch
review via email, and some trees are doing patch review via gerrit,
and yet other trees have their maintainer do a quick cursory review at
"git pull" time after the tree sends a git pull request.

What sort of shareable context should git --- which is ignorant of all
of these arrangements --- be preserving?  And presenting to whom?  And
for what goal/purpose?

						- Ted

  reply	other threads:[~2019-07-02 19:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 18:50 Tracking parent branches in Git Eric Kulcyk
2019-07-01 19:34 ` Junio C Hamano
2019-07-01 19:48   ` Bryan Turner
2019-07-01 20:12     ` rsbecker
2019-07-02  9:23       ` Philip Oakley
2019-07-02 17:36         ` Junio C Hamano
2019-07-02 18:52           ` Bryan Turner
2019-07-02 19:24             ` Theodore Ts'o [this message]
2019-07-03 15:58               ` Philip Oakley
2019-07-01 20:40     ` Eckhard Maaß
2019-07-01 20:58       ` Eric Kulcyk
2019-07-01 21:04         ` Eric Kulcyk
2019-07-02  6:42     ` Andreas Krey

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=20190702192412.GE3032@mit.edu \
    --to=tytso@mit.edu \
    --cc=Eric.kulcyk@microsoft.com \
    --cc=bturner@atlassian.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=philipoakley@iee.org \
    --cc=rsbecker@nexbridge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.