Git development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Peter Eriksen <s022018@student.dtu.dk>
Cc: git@vger.kernel.org
Subject: Re: Problems with binary patches (pull) and spaces in filenames (gitk)
Date: Wed, 9 Nov 2005 14:10:19 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0511091404000.4627@g5.osdl.org> (raw)
In-Reply-To: <20051109213730.GA23052@ebar091.ebar.dtu.dk>



On Wed, 9 Nov 2005, Peter Eriksen wrote:
> 
> 1) When pulling an updated binary files, I guess it still tries to 
>    print this update summary by making and processing patches, and so
>    gives this error:
> 
>        Updating from ab1c4033ba98c043e13da3446e7f244ac7f79942 to
>        c164231f6b59fd80171e95f31d762a80d884c708.
>        Fast forward
>        fatal: patch with only garbage at line 3249

Yes, this is "git-apply --stat" being unhappy about an empty patch.

Maybe we should only be unhappy when actually trying to apply (or check) 
the patch.

So a patch like the appended may or may not be the right solution.

> 2) When there are spaces in filenames, gitk only shows the first part of
>    the name in the filelist at the buttom right.

Can't help you there, that's more tcl/tk than I know. Paul?

		Linus

---
diff --git a/apply.c b/apply.c
index 3e53b34..da1416a 100644
--- a/apply.c
+++ b/apply.c
@@ -890,7 +890,7 @@ static int parse_chunk(char *buffer, uns
 
 	patchsize = parse_single_patch(buffer + offset + hdrsize, size - offset - hdrsize, patch);
 
-	if (!patchsize && !metadata_changes(patch))
+	if ((check ||apply) && !patchsize && !metadata_changes(patch))
 		die("patch with only garbage at line %d", linenr);
 
 	return offset + hdrsize + patchsize;

      parent reply	other threads:[~2005-11-09 22:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-09 21:37 Problems with binary patches (pull) and spaces in filenames (gitk) Peter Eriksen
2005-11-09 22:09 ` Junio C Hamano
2005-11-09 22:36   ` Junio C Hamano
2005-11-09 23:33     ` Peter Eriksen
2005-11-09 23:00   ` Jan Harkes
2005-11-09 22:10 ` Linus Torvalds [this message]

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=Pine.LNX.4.64.0511091404000.4627@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=s022018@student.dtu.dk \
    /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