From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Git Mailing List <git@vger.kernel.org>,
Torgil Svensson <torgil.svensson@gmail.com>,
msysGit <msysgit@googlegroups.com>
Subject: Take binary diffs into account for "git rebase"
Date: Sat, 18 Aug 2007 15:52:55 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0708181547400.30176@woody.linux-foundation.org> (raw)
In-Reply-To: <e7bda7770708181411v67730b57ibcd8df44695e036f@mail.gmail.com>
We used to not generate a patch ID for binary diffs, but that means that
some commits may be skipped as being identical to already-applied diffs
when doing a rebase.
So just delete the code that skips the binary diff. At the very least,
we'd want the filenames to be part of the patch ID, but we might also want
to generate some hash for the binary diff itself too.
This fixes an issue noticed by Torgil Svensson.
Tested-by: Torgil Svensson <torgil.svensson@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
Junio, you might want to do as the comment says, instead of just hashing
whatever random binary patch. Your call.
On Sat, 18 Aug 2007, Torgil Svensson wrote:
>
> This patch made the difference and solved the issue for me. Thanks
diff.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/diff.c b/diff.c
index 97cc5bc..a7e7671 100644
--- a/diff.c
+++ b/diff.c
@@ -2919,10 +2919,6 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1)
fill_mmfile(&mf2, p->two) < 0)
return error("unable to read files to diff");
- /* Maybe hash p->two? into the patch id? */
- if (diff_filespec_is_binary(p->two))
- continue;
-
len1 = remove_space(p->one->path, strlen(p->one->path));
len2 = remove_space(p->two->path, strlen(p->two->path));
if (p->one->mode == 0)
prev parent reply other threads:[~2007-08-18 23:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-18 19:37 file disappears after git rebase (missing one commit) Torgil Svensson
2007-08-18 20:01 ` Linus Torvalds
2007-08-18 20:29 ` Torgil Svensson
2007-08-18 20:55 ` Linus Torvalds
2007-08-18 21:11 ` Torgil Svensson
2007-08-18 22:52 ` 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=alpine.LFD.0.999.0708181547400.30176@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=msysgit@googlegroups.com \
--cc=torgil.svensson@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.
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).