git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
* under what circumstances will git replacements be pushed/pulled
@ 2020-01-13 17:24 peter green
  2020-01-13 17:47 ` Elijah Newren
  0 siblings, 1 reply; 2+ messages in thread
From: peter green @ 2020-01-13 17:24 UTC (permalink / raw)
  To: git

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.


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

* Re: under what circumstances will git replacements be pushed/pulled
  2020-01-13 17:24 under what circumstances will git replacements be pushed/pulled peter green
@ 2020-01-13 17:47 ` Elijah Newren
  0 siblings, 0 replies; 2+ messages in thread
From: Elijah Newren @ 2020-01-13 17:47 UTC (permalink / raw)
  To: peter green; +Cc: Git Mailing List

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

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-13 17:24 under what circumstances will git replacements be pushed/pulled peter green
2020-01-13 17:47 ` Elijah Newren

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git