From: Jonathan Nieder <jrnieder@gmail.com>
To: Aghiles <aghilesk@gmail.com>
Cc: git list <git@vger.kernel.org>,
Michael J Gruber <git@drmicha.warpmail.net>
Subject: Re: git pull with "no common commits" : danger?
Date: Thu, 8 Apr 2010 00:44:05 -0500 [thread overview]
Message-ID: <20100408054349.GA6067@progeny.tock> (raw)
In-Reply-To: <v2t3abd05a91004071856s5811e086q17241996a359e172@mail.gmail.com>
Hi,
Aghiles wrote:
> I mistakenly pulled a project into another project. I had the
> "warning: no common commits" but the pull did proceed.
First: you are aware that interrupting the pull will have no bad
side-effects, right? So if the worry is lost time, then git is not
advertising its features well enough.
Because of this, if ‘git fetch’ starts refusing to fetch when there
are no common commits, I will be unhappy, because it imposes hassle on
the user for basically no benefit.
On the other hand, ‘git pull’ is a little different. The fetch has
very little cost because it’s interruptible, but the merge could
result in two unrelated pieces of history being merged, requiring
the user to use ‘git reset --keep HEAD^’ to get back to the
previous state. A more likely outcome is a merge conflict, requiring
‘git reset --merge’ to recover.
Can we make this less painful? Is it worth adding yet another option
to ‘git pull’ to avoid this pain? I don’t know.
Regards,
Jonathan
next prev parent reply other threads:[~2010-04-08 5:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 1:56 git pull with "no common commits" : danger? Aghiles
2010-04-08 2:08 ` Michael J Gruber
2010-04-08 2:43 ` Aghiles
2010-04-08 5:44 ` Jonathan Nieder [this message]
2010-04-08 19:55 ` Aghiles
2010-04-08 6:20 ` Junio C Hamano
2010-04-08 19:46 ` Aghiles
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=20100408054349.GA6067@progeny.tock \
--to=jrnieder@gmail.com \
--cc=aghilesk@gmail.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).