From: Michael Gaber <Michael.Gaber@gmx.net>
To: Francis Moreau <francis.moro@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: question about a merge result
Date: Thu, 30 Apr 2009 14:34:43 +0200 [thread overview]
Message-ID: <49F99AE3.5090406@gmx.net> (raw)
In-Reply-To: <38b2ab8a0904300521m9e31867j7848135acfae0faa@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]
Francis Moreau schrieb:
> Hello,
>
> I'm a little bit confused about a merge I have done and the result
> suprised me. Thinking about it I'm still not convinced what should be
> the result.
>
> Here's the use case:
>
> $ mkdir test-git && cd test-git
> $ date > A
> $ date > B
> $ git init
> $ git add .
> $ git commit -m "Init"
>
> So far I just created a repo with 2 files A and B
>
> $ git branch b1
> $ git rm B
> $ git commit -m "remove B"
>
> Now I created a branch 'b1' and remove B file in master branch
>
> $ git checkout b1
> $ git rm B
> $ git commit -m "remove B"
> $ git revert HEAD
>
> Now on 'b1' I did the same as master but I thought that removing B was
> a bad idea so I revert the previous commit
>
> $ git checkout master
> $ git pull . b1
> $ ls B
> ls: cannot access B: No such file or directory
>
> So merging 'b1' into master removed the B file even if in branch 'b1'
> I restored it.
>
> Could anybody explain me why this is the correct behaviour and why not
> file 'B' is not restored as it was done in branch 'b1' ?
>
> thanks
well, I'd say the thing is, that in b1 there is no change at all to the
tree anymore, so when applied to master (without B) there is no b restored
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3643 bytes --]
next prev parent reply other threads:[~2009-04-30 12:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 12:21 question about a merge result Francis Moreau
2009-04-30 12:34 ` Michael Gaber [this message]
2009-04-30 14:26 ` Jeff King
2009-04-30 15:05 ` Francis Moreau
2009-04-30 15:39 ` Björn Steinbrink
2009-04-30 15:42 ` Jeff King
2009-05-01 16:27 ` Daniel Barkalow
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=49F99AE3.5090406@gmx.net \
--to=michael.gaber@gmx.net \
--cc=francis.moro@gmail.com \
--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).