git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Santi <sbejar@gmail.com>
To: git@vger.kernel.org, "Junio C Hamano" <junkio@cox.net>
Subject: Merge with local conflicts in new files
Date: Wed, 17 May 2006 00:00:10 +0200	[thread overview]
Message-ID: <8aa486160605161500m1dd8428cj@mail.gmail.com> (raw)

Hi *,

       In the case of:

- You merge from a branch with new files
- You have these files in the working directory
- You do not have these files in the HEAD.

   The end result is that you lose the content of these files.

   So an additional check for the merge is to check for these dirty
but not in HEAD files.

   Here is a test that reproduce it. I expect the merge to fail and
with the content of foo being bar.

test_description='Test merge with local conflicts in new files'
. ./test-lib.sh

test_expect_success 'prepare repository' \
'echo "Hello" > init &&
git add init &&
git commit -m "Initial commit" &&
git branch B &&
echo "foo" > foo &&
git add foo &&
git commit -m "File: foo" &&
git checkout B &&
echo "bar" > foo '

test_expect_code 1 'Merge with local conflicts in new files' 'git
merge "merge msg" B master'

test_done

Thanks.

             reply	other threads:[~2006-05-16 22:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-16 22:00 Santi [this message]
2006-05-16 22:12 ` Merge with local conflicts in new files Santi
2006-05-16 22:40 ` Junio C Hamano
2006-05-16 23:11   ` Santi
2006-05-16 23:28     ` Junio C Hamano
2006-05-17  7:47       ` Pavel Roskin
2006-05-17  8:20         ` Junio C Hamano
2006-05-17  8:50         ` Martin Langhoff
2006-05-17  8:17     ` [PATCH/RFC] read-tree -m -u: do not overwrite or remove untracked working tree files Junio C Hamano
2006-05-17  8:24       ` Jakub Narebski

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=8aa486160605161500m1dd8428cj@mail.gmail.com \
    --to=sbejar@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.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).