public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in•waw.pl>
To: "Randal L. Schwartz" <merlyn@stonehenge•com>
Cc: Ralf Nyren <ralf.nyren@ericsson•com>,
	git@vger•kernel.org, Junio C Hamano <gitster@pobox•com>
Subject: Re: Strange effect merging empty file
Date: Thu, 22 Mar 2012 13:47:04 +0100	[thread overview]
Message-ID: <4F6B1F48.3040007@in.waw.pl> (raw)
In-Reply-To: <86iphwomnq.fsf@red.stonehenge.com>

On 03/22/2012 01:17 PM, Randal L. Schwartz wrote:
>>>>>> "Zbigniew" == Zbigniew Jędrzejewski-Szmek<zbyszek@in•waw.pl>  writes:
>
> Zbigniew>  touch .gitignore
>
> If you're doing this to make sure git makes an empty directory, always
> put the directory name in there as a comment... that makes it (a) not an
> empty file (so merge doesn't get confused) and (b) unique, so when you
> change it, merge won't try to change other similar empty files.

Yes, this will indeed fix this particular problem. But in general, empty 
files can be used for various reasons, and it can be a pretty nasty 
surprise if they sprout random content as a result of a merge.

Maybe merge-recursive could special-case empty files?

Zbyszek

  parent reply	other threads:[~2012-03-22 12:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 10:28 Strange effect merging empty file Ralf Nyren
2012-03-21 10:54 ` Zbigniew Jędrzejewski-Szmek
2012-03-21 17:14   ` Junio C Hamano
2012-03-22 12:17   ` Randal L. Schwartz
2012-03-22 12:39     ` Ralf Nyren
2012-03-22 12:47     ` Zbigniew Jędrzejewski-Szmek [this message]
2012-03-22 14:01       ` Jeff King
2012-03-22 17:03         ` Junio C Hamano
2012-03-22 17:59           ` Jeff King
2012-03-22 18:25             ` Jeff King
2012-03-22 18:52               ` Jeff King
2012-03-22 18:53                 ` [PATCH 1/3] drop casts from users EMPTY_TREE_SHA1_BIN Jeff King
2012-03-22 18:53                 ` [PATCH 2/3] make is_empty_blob_sha1 available everywhere Jeff King
2012-03-22 18:53                 ` [PATCH 3/3] merge-recursive: don't detect renames from empty files Jeff King
2012-03-22 19:18                   ` Jonathan Nieder
2012-03-22 21:53                     ` Jeff King
2012-03-22 18:52               ` Strange effect merging empty file Junio C Hamano
2012-03-22 19:03                 ` Jeff King
2012-03-22 19:12                   ` Junio C Hamano
2012-03-22 22:46                     ` [PATCH 0/2] merging renames of empty files Jeff King
2012-03-22 22:52                       ` [PATCH 1/2] teach diffcore-rename to optionally ignore empty content Jeff King
2012-03-22 22:52                       ` [PATCH 2/2] merge-recursive: don't detect renames of empty files Jeff King
2012-03-22 23:37                       ` [PATCH 0/2] merging " Junio C Hamano
2012-03-23  0:23                         ` Jeff King
2012-03-23  4:56                           ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F6B1F48.3040007@in.waw.pl \
    --to=zbyszek@in$(echo .)waw.pl \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=merlyn@stonehenge$(echo .)com \
    --cc=ralf.nyren@ericsson$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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