From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Imre Deak <imre.deak@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] builtin-apply: check for empty files when detecting creation patch
Date: Tue, 13 May 2008 15:34:05 -0700 [thread overview]
Message-ID: <7vlk2dsujm.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0805131514300.3019@woody.linux-foundation.org> (Linus Torvalds's message of "Tue, 13 May 2008 15:24:45 -0700 (PDT)")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> Look at CVS-generated patches, or SVN for that matter. The diffs look like
> this:
>
> Index: file
> ===================================================================
> --- file (revision 0)
> +++ file (working copy)
> @@ -0,0 +1 @@
> +test
>
> and there is no /dev/null there.
>
> The thing is, git-apply is careful, and it's very much careful with
> respect to *knowing* that there are lots of different versions of "diff"
> floating around, and lots of different SCM systems that generate odd diff
> headers. We should absolutely NOT start expecting that diffs are only
> generated with GNU diff.
>
> So non-/dev/null'ness means absolutely nothing. It means "don't know", and
> we should leave is_new and is_delete as -1.
Ok, then what's the judgement for the original issue? Is it a user error
to have a tracked absolutely empty file in the index?
next prev parent reply other threads:[~2008-05-13 22:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-08 14:39 [PATCH] builtin-apply: check for empty files when detecting creation patch Imre Deak
2008-05-11 2:36 ` Junio C Hamano
2008-05-13 20:16 ` Imre Deak
2008-05-13 21:48 ` Junio C Hamano
2008-05-13 22:24 ` Linus Torvalds
2008-05-13 22:34 ` Junio C Hamano [this message]
2008-05-13 22:58 ` Linus Torvalds
2008-05-14 0:13 ` Junio C Hamano
2008-05-14 1:14 ` Linus Torvalds
2008-05-17 9:12 ` Junio C Hamano
2008-05-17 9:18 ` [PATCH 1/2] builtin-apply: accept patch to an empty file Junio C Hamano
2008-05-17 9:19 ` [PATCH 2/2] builtin-apply: do not declare patch is creation when we do not know it 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=7vlk2dsujm.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=imre.deak@gmail.com \
--cc=torvalds@linux-foundation.org \
/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.
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 NNTP newsgroup(s).