git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Elijah Newren <newren@gmail.com>
To: peter green <plugwash@p10link.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: under what circumstances will git replacements be pushed/pulled
Date: Mon, 13 Jan 2020 09:47:23 -0800	[thread overview]
Message-ID: <CABPp-BH49aX=DX=p3bNZaTo8LKt=FH_J3h34Tbf2cYx+DJD2LQ@mail.gmail.com> (raw)
In-Reply-To: <7adb48ad-299d-bbec-c467-b29376583486@p10link.net>

On Mon, Jan 13, 2020 at 9:31 AM peter green <plugwash@p10link.net> wrote:
>
> I need to make some local tweaks to history to make merges go more smoothly, traditionally the tool for doing this is grafts, however git is yelling at me that grafts are deprecated and will be removed in a future release and that I should use git-replace instead.
>
> However there is something that is concerning me, https://git.wiki.kernel.org/index.php/GraftPoint says
>
>  > As of Git 1.6.5, the more flexible git replace has been added, which
>  > allows you to replace any object with any other object, and tracks
>  > the associations via refs which can be pushed and pulled between repos.
>
> However the git-replace man page makes no mention of push or pull.
>
> under what circumstances will replacements be pushed or pulled, and what if any steps do I need to take to ensure that my replacements stay local.

People have to take special steps to push or pull replace refs.

Replace refs are special refnames in the refs/replace/ hierarchy.
Since clones by default only grab stuff under refs/heads/ and
refs/tags/ and set up fetches to do likewise, you don't get these by
default.  None of the push.default settings (simple, upstream,
matching, current) will push these either.  So, if the user wants to
transfer replace refs, they either need to manually call out the
refspecs, use a special fetch/push flag like --mirror, or set up a
special remote.<name>.fetch or remote.<name>.push config setting.

In other words, your replace references are local-only by default.
Anyone who wants to share them will have to be the ones to take
special steps, and likely at more than one stage (e.g. a special step
to push them to some central repo, and notify your co-worker of the
special commands they have to use to fetch them).

      reply	other threads:[~2020-01-13 17:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 17:24 under what circumstances will git replacements be pushed/pulled peter green
2020-01-13 17:47 ` Elijah Newren [this message]

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='CABPp-BH49aX=DX=p3bNZaTo8LKt=FH_J3h34Tbf2cYx+DJD2LQ@mail.gmail.com' \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=plugwash@p10link.net \
    /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).