git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Santi <sbejar@gmail.com>, git@vger.kernel.org
Subject: Re: Merge with local conflicts in new files
Date: Wed, 17 May 2006 03:47:32 -0400	[thread overview]
Message-ID: <1147852052.31879.50.camel@dv> (raw)
In-Reply-To: <7vu07p35xn.fsf@assigned-by-dhcp.cox.net>

Hello, Junio!

On Tue, 2006-05-16 at 16:28 -0700, Junio C Hamano wrote:
> Santi <sbejar@gmail.com> writes:
> 
> > 2006/5/17, Junio C Hamano <junkio@cox.net>:
> >>  - You have not told git that these files matter.
> >
> > For me it is the other way, all my files matter but git can do
> > whatever it wants with the ones it controls.
> 
> You really do not mean that.
> 
> If you told git a file matters, and have local modifications to
> the file in the working tree that you have not run update-index
> yet, merge and apply should be careful not to overwrite your
> changes that is not ready while doing whatever thing they have
> to do.  And they are careful, because you have told git that
> they matter, and the way you tell git that they matter is to
> have entries for them in the index.

I'm afraid this approach, while understandable from the technical
standpoint, could prevent git from ever becoming a version control
system that "just works" without any porcelains.

I know a person who refuses to use any version control.  If he
encountered this situation, he would never try any version control
again.

After all, we are talking about files in the _working_ directory.  It's
not merely a transient appendix to the repository.  git is not the only
player here.  If a file doesn't "belong" to git, it belongs to its
"supreme commander", i.e. the user, and should be approached with utmost
care.

Merging a branch should not cause an irreparable loss of user data.  The
same applies to other commands.  Exceptions can be made for commands
that are specifically meant to clean user data, for commands with
special options (e.g. --force or --hard), and for the files explicitly
marked as transient (e.g. in .gitignore).

-- 
Regards,
Pavel Roskin

  reply	other threads:[~2006-05-17  7:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-16 22:00 Merge with local conflicts in new files Santi
2006-05-16 22:12 ` 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 [this message]
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=1147852052.31879.50.camel@dv \
    --to=proski@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=sbejar@gmail.com \
    /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).