Re: file disappears after git rebase (missing one commit)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sat, 18 Aug 2007, Torgil Svensson wrote:
>
> $ git rebase devel
> First, rewinding head to replay your work on top of it...
> HEAD is now at 57aa840... Add disk summarize tool (du.exe)
> Nothing to do.

Ok. "git rebase" really does believe that there's nothing to do.

The reason, I think, is that I suspect that the newly added file is a 
binary file, no? That, in turn, will mean that the *patch* will have no 
patch ID (or rather, it will have an empty patch ID) - which in turn will 
make it invisible to "--ignore-if-in-upstream" if there are already some 
*other* patches that also just adds a binary file (which I think there is: 
I think upstream has "Add disk summarize tool (du.exe)" which I assume has 
exactly the same patch fingerprint).

In other words, "git rebase" really is just a series of cherry-picks, but 
it avoids patches that have the same patch ID as something that is already 
upstream. That helps *enormously*, but it so happens that the patch ID's 
don't work really well for binary diffs.

Try this patch - see if it helps. Totally untested! It will enable patch 
ID's on binary diffs too, which should avoid this issue.

		Linus

---
diff --git a/patch-ids.c b/patch-ids.c
index a288fac..4a3432e 100644
--- a/patch-ids.c
+++ b/patch-ids.c
@@ -122,6 +122,7 @@ int init_patch_ids(struct patch_ids *ids)
 	memset(ids, 0, sizeof(*ids));
 	diff_setup(&ids->diffopts);
 	ids->diffopts.recursive = 1;
+	ids->diffopts.binary = 1;
 	if (diff_setup_done(&ids->diffopts) < 0)
 		return error("diff_setup_done failed");
 	return 0;
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux