git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Sitaram Chamarty <sitaramc@gmail.com>
Cc: Jeff King <peff@peff.net>, Graham Perks <gperks@ausperks.net>,
	Git List <git@vger.kernel.org>
Subject: Re: Am able to delete a file with no trace in the log
Date: Tue, 2 Jun 2009 18:20:44 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0906021811440.4880@localhost.localdomain> (raw)
In-Reply-To: <2e24e5b90906021747v327c9db1o16d03af5dcf50546@mail.gmail.com>



On Wed, 3 Jun 2009, Sitaram Chamarty wrote:
> 
> "git merge -s ours" would do precisely the same thing, wouldn't it?

Yes. It doesn't matter which way it goes - if a file is seen as being 
identical (and "none" very much counts) in one parent, it's not judged 
"interesting" from a merge patch standpoint, or even from a "git log" 
(aka "revision history") standpoint.

> That has happened to me before, and I noticed that git log does not
> show the deletion, but rationalised it as being because I had
> explicitly done a "-s ours".
> 
> Fixing this would fix that (maybe more common) case too, and show that
> the merge commit removed the file.

The problem is that quite often, a merge that removes a file _is_ the 
correct thing when it was removed in one branch, and a merge that adds a 
file is even more common, and in no way special. We don't show the whole 
diff in a merge, because the whole diff is often nonsensical (ie so 
trivial that showing it all just hides the parts that are actually 
relevant).

So I'll have to think about it a bit more. We clearly don't generate good 
diffs for file deletion/creation in merges, and we should improve on it, 
but it's definitely not a trivial issue either.

		Linus

  reply	other threads:[~2009-06-03  1:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 19:33 Am able to delete a file with no trace in the log Graham Perks
2009-06-02 20:29 ` Tony Finch
2009-06-02 21:34 ` Jeff King
2009-06-02 21:55   ` Linus Torvalds
2009-06-03  0:47     ` Sitaram Chamarty
2009-06-03  1:20       ` Linus Torvalds [this message]
2009-06-03  1:34     ` Clean up and simplify rev_compare_tree() Linus Torvalds
2009-06-03  1:57     ` Am able to delete a file with no trace in the log Junio C Hamano
2009-06-03  3:03       ` Linus Torvalds
2009-06-03 21:18         ` Junio C Hamano
2009-06-03 21:26           ` Linus Torvalds
2009-06-03 21:33           ` Linus Torvalds
2009-06-03 21:59             ` Avery Pennarun
2009-06-03 22:02             ` Junio C Hamano
2009-06-03 22:17               ` Linus Torvalds
2009-06-03 22:38                 ` Junio C Hamano
2009-06-03 22:44                   ` Jeff King
2009-06-03 22:56                     ` Linus Torvalds
2009-06-03 23:06                       ` Jeff King
2009-06-03 23:27                         ` Linus Torvalds
2009-06-03 23:37                           ` Jeff King
2009-06-04  1:58                             ` Linus Torvalds
2009-06-04  6:57                       ` Junio C Hamano
2009-06-03 22:47                   ` Linus Torvalds
2009-06-03 22:56                 ` Junio C Hamano
2009-06-03 21:55         ` Junio C Hamano

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=alpine.LFD.2.01.0906021811440.4880@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=gperks@ausperks.net \
    --cc=peff@peff.net \
    --cc=sitaramc@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).