git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Steffen Prohaska <prohaska@zib.de>
Cc: Andreas Ericsson <ae@op5.se>, git@vger.kernel.org
Subject: Re: [PATCH 10/10] push: teach push to be quiet if local ref is strict subset of remote ref
Date: Thu, 01 Nov 2007 13:18:52 -0700	[thread overview]
Message-ID: <7vfxzpbtxv.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <3550D197-CA8C-4B06-9A95-3C7F18EBEFA7@zib.de> (Steffen Prohaska's message of "Thu, 1 Nov 2007 17:43:29 +0100")

Steffen Prohaska <prohaska@zib.de> writes:

> On Nov 1, 2007, at 10:11 AM, Andreas Ericsson wrote:
>
>> Steffen Prohaska wrote:
>>
>>> You're forced to do the integration immediately.

The context of this "forced" is that you say (in the following
paragraph) the user's main objective was to "push", but I do not
think "to push" is ever the main objective.

 - If it is to give integrated result for others to work further
   on, then you need to resolve before being able to achieve
   that goal.  There is no escaping from it.

 - On the other hand, if it is to show what you did as early as
   possible in a working shape, and if the updated shared
   repository has changes from somebody else that conflicts you,
   in a CVS/SVN style shared workflow, there is no way for you
   to show what you did in isolation.  If you try to follow that
   model in git and insist pushing to the same branch, then you
   are forced to resolve first.

   But you do not have to.  You could push out to another new
   branch, and say "Here is how you could do it, although this
   is based on an older codebase and conflicts with what
   recently happened to the tip".  You could even ask other
   party whose changes conflict with yours to help with the
   merge by saying "I pushed it out, you are more familiar with
   that area of the code and with your changes near the tip of
   the trunk, so could you merge it and push out the result?"

>> Yes, but you get to choose how. Perhaps git-push should list more
>> options than just git-pull, such as the three commands required to
>> rebase the currently checked out branch onto its remote counterpart.
>> That would support more workflows.
>
> I agree. Providing better hints would be good.

I am not so sure about that.  If there are three different
workflows, should git-push give hints suitable for all of them?

The current hint was added in response to users' requests, and I
think it could be generalized.  What we would want the end user
to realize is:

    What I tried to push out is stale, I do not want to push out
    something that does not contain what the other side has
    done, so I need to integrate my work with what the other
    side have before pushing to that branch at the remote.

    In my workflow, that means doing rebase of the branch I
    tried to push out on top of the remote branch I was trying
    to push to.

The second paragraph depends on the workflow.  Do we want to
(can we afford the space to) give a laundry list here?  Probably
not.

>>> Your main objective was to push, but the shared workflow forces
>>> you to do the integration _now_ (by using pull). In a pull-only
>>> workflow, you can just push and defer the integration for later.
>>
>> No, you can also fetch + rebase.
>
> Right. My point was than one cannot defer the integration. It
> must be addressed immediately.

See above.

>>> Some people claim fetch + rebase is superior to fetch + merge.
>>> The only point I can see is that fetch + rebase gives a linear
>>> history without loops, which is nicer to visualize. I recently
>>> asked on the list if there are any benefits of fetch + rebase
>>> over fetch + merge, besides a nicer visualization.
>>
>>
>> It's easier to bisect...
>> With a mostly linear history, this problem goes away.
>
> This is really an interesting point. I did not start to use
> git bisect regularly. But I certainly plan to do so in the future.
>
> Couldn't bisect learn to better cope with non-linear history?

It copes with it as best as it can.

Another thing to think about is how "everybody fetches, merges
and pushes out" would interact with the concept of "mainline".
Strictly speaking, the point of distributed development is that
there is no mainline, but workflows based on "fetch + rebase"
allows --first-parent to give a reasonable approximation of what
people would naively expect how the mainline would look like.
If everybody fetches, merges and pushes out, there is no
"mainline" and --first-parent would give totally useless
history.

  reply	other threads:[~2007-11-01 20:19 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-28 17:46 [PATCH 0/10 v3] improve refspec handling in push Steffen Prohaska
2007-10-28 17:46 ` [PATCH 01/10] push: change push to fail if short refname does not exist Steffen Prohaska
2007-10-28 17:46   ` [PATCH 02/10] push: teach push new flag --create Steffen Prohaska
2007-10-28 17:46     ` [PATCH 03/10] push: support pushing HEAD to real branch name Steffen Prohaska
2007-10-28 17:46       ` [PATCH 04/10] push: add "git push HEAD" shorthand for 'push current branch to default repo' Steffen Prohaska
2007-10-28 17:46         ` [PATCH 05/10] rename ref_matches_abbrev() to ref_abbrev_matches_full_with_fetch_rules() Steffen Prohaska
2007-10-28 17:46           ` [PATCH 06/10] add ref_abbrev_matches_full_with_rev_parse_rules() comparing abbrev with full ref name Steffen Prohaska
2007-10-28 17:46             ` [PATCH 07/10] push: use same rules as git-rev-parse to resolve refspecs Steffen Prohaska
2007-10-28 17:46               ` [PATCH 08/10] push: teach push to accept --verbose option Steffen Prohaska
2007-10-28 17:46                 ` [PATCH 09/10] push: teach push to pass --verbose option to transport layer Steffen Prohaska
2007-10-28 17:46                   ` [PATCH 10/10] push: teach push to be quiet if local ref is strict subset of remote ref Steffen Prohaska
2007-10-30  8:29                     ` Junio C Hamano
2007-10-30 10:15                       ` Steffen Prohaska
2007-10-30 10:26                         ` Andreas Ericsson
2007-10-30 10:53                           ` Steffen Prohaska
2007-10-30 19:19                         ` Junio C Hamano
2007-10-31  7:53                           ` Steffen Prohaska
2007-10-31  8:45                             ` Junio C Hamano
     [not found]                               ` <B3C76DB8-076D-4C43-AC28-99119A05325C@z ib.de>
2007-10-31  9:14                               ` Junio C Hamano
2007-10-31 10:50                               ` Steffen Prohaska
2007-10-31 18:51                                 ` Junio C Hamano
2007-10-31 21:09                                   ` Steffen Prohaska
2007-10-31 21:31                                     ` Junio C Hamano
2007-11-01  7:03                                       ` Steffen Prohaska
2007-11-01  9:11                                         ` Andreas Ericsson
2007-11-01 16:43                                           ` Steffen Prohaska
2007-11-01 20:18                                             ` Junio C Hamano [this message]
2007-11-02  7:21                                               ` Steffen Prohaska
2007-11-02  7:52                                                 ` Junio C Hamano
2007-11-02 10:03                                                   ` Steffen Prohaska
2007-11-02 10:44                                                     ` Junio C Hamano
2007-11-02 11:40                                                       ` Steffen Prohaska
2007-11-02 10:03                                             ` Andreas Ericsson
2007-11-02 13:24                                               ` Tom Prince
2007-11-02 13:52                                                 ` Andreas Ericsson
2007-11-02 14:49                                                   ` Steffen Prohaska
2007-11-02 19:42                                                   ` Junio C Hamano
2007-11-02 20:19                                                     ` Junio C Hamano
2007-11-01  8:18                                       ` Andreas Ericsson
2007-11-01  8:36                                         ` Steffen Prohaska
2007-11-01  9:29                                           ` Andreas Ericsson
2007-11-02  8:18                                       ` Wincent Colaiuta
2007-11-02 12:14                                         ` Johannes Schindelin
2007-11-02 12:48                                           ` Steffen Prohaska
2007-11-02 13:11                                             ` Wincent Colaiuta
2007-10-30 18:00                       ` Daniel Barkalow
2007-10-30  8:28               ` [PATCH 07/10] push: use same rules as git-rev-parse to resolve refspecs Junio C Hamano
2007-10-30  8:49                 ` Steffen Prohaska
2007-10-30  8:28         ` [PATCH 04/10] push: add "git push HEAD" shorthand for 'push current branch to default repo' Junio C Hamano
2007-10-30  8:28       ` [PATCH 03/10] push: support pushing HEAD to real branch name Junio C Hamano
2007-10-30  8:29   ` [PATCH 01/10] push: change push to fail if short refname does not exist Junio C Hamano
2007-10-30  8:56     ` Steffen Prohaska
2007-10-30  9:22       ` 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=7vfxzpbtxv.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=prohaska@zib.de \
    /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).