git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: wh <microrffr@gmail.com>,
	phillip.wood@dunelm.org.uk, git@vger.kernel.org,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [BUG] rebase --interactive silently overwrites ignored files
Date: Sun, 05 May 2019 13:02:06 +0900	[thread overview]
Message-ID: <xmqq4l69tupt.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <3bf0f04d-83d4-ef13-8e19-a679b4153793@gmail.com> (Phillip Wood's message of "Thu, 2 May 2019 16:45:46 +0100")

Phillip Wood <phillip.wood123@gmail.com> writes:

> I've had a look at the rebase -i code and I think it only overwrites
> ignored files when it is fast-forwarding. This matches what merge does
> when fast-forwarding but I'm not convinced either of them should be
> doing this by default (I think checkout doing it is probably asking
> for trouble)...

> I'll put a patch together to fix rebase -i, I'd like to see the
> defaults for merge and checkout changed but I'm not sure that would be
> popular.

I suspect that such a change in behaviour for "rebase -i" is not a
fix but a regression.  Shouldn't it be consistent with checkout and
merge?

> It does seem like surprising behavior though when most
> operations try to preserve untracked files.

Are you conflating untracked and ignored?

Because we haven't adopted 'precious' (or whatever the final name
would be), which is "ignored but not expendable", ignored files are
by definition "ignored and expendable".  When checkout (and merge
that is its more general form) needs to match the working tree to
the index contents and an ingored file is in the way, it should
overwrite it.  

Until we introduce "ignored but not expendable" class, that is.

  parent reply	other threads:[~2019-05-05  4:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 23:56 [BUG] rebase --interactive silently overwrites ignored files wh
2019-04-12 16:30 ` Phillip Wood
2019-04-14  1:59   ` wh
2019-04-14 13:24     ` Phillip Wood
2019-05-02 15:45     ` Phillip Wood
2019-05-02 16:22       ` Duy Nguyen
2019-05-05  4:02       ` Junio C Hamano [this message]
2019-05-07 14:03         ` Phillip Wood

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=xmqq4l69tupt.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=microrffr@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=phillip.wood123@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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).