From: Jonathan Nieder <jrnieder@gmail.com>
To: Cory Fields <FOSS@AtlasTechnologiesInc.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>, git@vger.kernel.org
Subject: Re: 'git replace' and pushing
Date: Fri, 26 Nov 2010 15:43:25 -0600 [thread overview]
Message-ID: <20101126214325.GC23462@burratino> (raw)
In-Reply-To: <AANLkTimQ3fjPb+YVJ5i8EAgui+gd5rfnXMvdQPJPeUtA@mail.gmail.com>
Hi Cory,
Cory Fields wrote:
> I realize that allowing replacements to be pushed "behind users backs", so
> I guess not respecting it makes sense.
>
> But is there no way that I can pull this off without rewriting hashes?
The usual way to accomplish what you are talking about would be like
this:
Real history
------------
4' --- 5 --- 6
1 --- 2 --- 3 --- 4
Fake history
------------
1 --- 2 --- 3 --- 4 --- 5 --- 6
Replacement ref
---------------
4' --> 4
This way, a person a person can fetch either piece of real history
without trouble, and if they fetch the replacement ref, too, the
history is pasted together.
It is not possible in git to push a commit without its ancestors;
replacement refs do not change that. However, it is sort of possible
to fetch a commit without its ancestors using the --depth option to
clone and fetch.
Hope that helps,
Jonathan
next prev parent reply other threads:[~2010-11-26 22:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-24 4:33 'git replace' and pushing Cory Fields
2010-11-25 8:37 ` Michael J Gruber
2010-11-26 21:16 ` Cory Fields
2010-11-26 21:43 ` Jonathan Nieder [this message]
2010-11-26 23:18 ` Junio C Hamano
2010-11-27 1:58 ` Cory Fields
2010-11-26 20:29 ` Martin von Zweigbergk
2010-11-27 1:59 ` Cory Fields
2010-11-27 7:52 ` Jonathan Nieder
2010-11-27 17:54 ` Cory Fields
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=20101126214325.GC23462@burratino \
--to=jrnieder@gmail.com \
--cc=FOSS@AtlasTechnologiesInc.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.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.
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).