Re: Problems with binary patches (pull) and spaces in filenames (gitk)
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Nov 9, 2005, 22:10 UTC
- Message-ID
- <Pine.LNX.4.64.0511091404000.4627@g5.osdl.org>
- In-Reply-To
- <20051109213730.GA23052@ebar091.ebar.dtu.dk>
On Wed, 9 Nov 2005, Peter Eriksen wrote:
Show 9 quoted lines
> > 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;