git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jacob Keller <jacob.keller@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>,
	Andreas Schwab <schwab@linux-m68k.org>,
	Git Mailing list <git@vger.kernel.org>
Subject: Re: man page for "git remote set-url" seems confusing/contradictory
Date: Mon, 16 Apr 2018 18:01:33 -0700	[thread overview]
Message-ID: <CA+P7+xrY83CM6WYoxio2nPGzeg1YNGbptM52Opu2UBgdk9Y-4A@mail.gmail.com> (raw)
In-Reply-To: <xmqqefjewxr4.fsf@gitster-ct.c.googlers.com>

On Mon, Apr 16, 2018 at 4:13 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Jacob Keller <jacob.keller@gmail.com> writes:
>
>> Things won't work so well if you set the push url and fetch url to
>> different repositories. Git assumes that refs updated by "push" will
>> also be reflected via "fetch".
>>
>> I don't know offhand what will break, but likely something will. For
>> one, when you fetch again it will rewind your remotes after the push.
>
> Exactly.  I still haven't fully embraced it myself, but for a long
> time, "git push" pretends as if it fetched from that remote and
> updates the corresponding remote tracking branches (if you have
> any), so you'll be inviting inconsistent behaviour if you set your
> fetch and push URLs pointing at two logically separate places.
>
> This is a tangent, but there probably should be a boolean that
> disables this feature in "git push" per destination repository,
> i.e. "when pushing into this repository, pretend that we immediately
> fetched from the refs we just pushed to and update the remote
> tracking branches we have for them: yes/no".  It is not entirely
> implausible to envision an overly smart remote repository that turns
> a non-fast-forward push into an automatic rebase when it is safe to
> do so, instead of failing such a push, and you'd disable the "assume
> what we pushed would appear there" when talking to such a remote.
>

Not to mention something like gerrit which uses magical references
"refs/publish/branchname" which don't actually get generated on the
server.

Thanks,
Jake

  reply	other threads:[~2018-04-17  1:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 12:43 man page for "git remote set-url" seems confusing/contradictory Robert P. J. Day
2018-04-16 16:14 ` Andreas Schwab
2018-04-16 16:19   ` Robert P. J. Day
2018-04-16 18:20     ` Jacob Keller
2018-04-16 23:13       ` Junio C Hamano
2018-04-17  1:01         ` Jacob Keller [this message]
2018-04-17 15:34         ` Robert P. J. Day
2018-04-17 17:41           ` Jacob Keller
2018-04-18  0:06             ` Junio C Hamano
2018-04-18 20:56               ` Todd Zullinger
2018-04-19  4:17                 ` Martin Ågren
2018-04-19 17:32                   ` [PATCH] doc/clone: update caption for GIT URLS cross-reference Todd Zullinger

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+P7+xrY83CM6WYoxio2nPGzeg1YNGbptM52Opu2UBgdk9Y-4A@mail.gmail.com \
    --to=jacob.keller@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rpjday@crashcourse.ca \
    --cc=schwab@linux-m68k.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).