Re: format-patch broken [Was: fetch and bundle don't work in (semi-)broken repo]

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

 



Hello,

On Thu, Oct 21, 2010 at 09:11:06AM +0200, Uwe Kleine-König wrote:
> On Wed, Oct 20, 2010 at 01:05:26PM -0400, Nicolas Pitre wrote:
> > On Wed, 20 Oct 2010, Uwe Kleine-König wrote:
> > 
> > > On Wed, Oct 20, 2010 at 09:38:14AM -0400, Nicolas Pitre wrote:
> > > > On Wed, 20 Oct 2010, Uwe Kleine-König wrote:
> > > > 
> > > > > If you want I can provide you the broken repo.
> > > > 
> > > > Yes, please.
> > 
> > I'm trying to reproduce the exact error you get. But I'm missing some 
> > alternates for objects, and none of the trees I have locally provide the 
> > needed objects.
> > 
> > [nico@xanadu linux-2.6]$ ! git format-patch linus/master..sectionmismatches
> > 0001-wip-enable-DEBUG_SECTION_MISMATCH.patch
> > 0002-ARM-sa1111-move-__sa1111_probe-to-.devinit.text.patch
> > 0003-ARM-omap1-nokia770-mark-some-functions-__init.patch
> > fatal: unable to read destination tree (16edb8381f2f2dabec9cc59f4a3d8c9ead899668)
> > 
> > What do you have in your alternate repo?
> Hmm, I just unpacked the archive in a seperate directory, removed
> .git/objects/info/alternates and then git format-patch
> linus/master..sectionmismatches fails in a different way:
> 
> 	fatal: Invalid revision range linus/master..sectionmismatches
> 
> I guess adding a pristine copy of Linus' tree should do the trick.
> 
> [ ... some time later ... creating a fresh clone takes quite some time ... ]
> 
> No, that's not enough, I will handpick some objects from the original.
> 
> Ah, you only need 16edb8381f2f2dabec9cc59f4a3d8c9ead899668 to make
> format-patch work, but still 09b3f464a50111071f7740056b98fa8f36133347 is
> missing for this tree.  This doesn't hurt format-patch as it's enough
> for it to know that this entry didn't change.  So format-patch needs
> less information than bundle/fetch and it's OK that the former succeeds
> and the latter fails.
> 
> [...]
> 
> No, that's not the (only) problem,
> 40aaeb204dc04d3cf15c060133f65538b43b13b0 is needed, git format-patch is
> just ignorant enough and invents something different:
> 
> 	username@hostname:~/path/linux-2.6$ git rev-list linus/master..sectionmismatches
> 	eb84720860a90769473b42215a4cb67ee5efe7a7
> 	2e14a5c831032fa489384763087f4a03d88607cb
> 	00b18e8058e98927e2e4eae32deae7e58f47467c
> 	1ad328f663128b5c6e6b4af1ac2da1b443dba530
> 	2a0e4c23a34c78891db685b2b4851705fd36d656
> 	089d061c26b00a5b8dbb9e70b81d36a97e1daded
> 	b7ce4ec88f1bdfbe49fa7ef12df8f985d705605a
> 	b40acb01793933cd6baaaf826f3fef6dd734f72b
> 	780e3d47d067b54b17bcac3794d62825e8e60422
> 	ce06129cf7bbf85afe4fc127afc957d36ba4e9e4
> 	c2172d687578e7eb037a232802a4a8c6de1b0eea
> 	0c23684f39714a72f54036ca2be36e8894794b66
> 	cea2a0668ee1a9dc3617a810954a41c7701a08e9
> 	2bd6ff604ac3aa4c96636dda1ad80a289205ccba
> 	7591700d538d08f2e8327bb439b6cb0488e13f3e
> 
> 	username@hostname:~/path/linux-2.6$ git diff-tree -r 7591700d538d08f2e8327bb439b6cb0488e13f3e
> 	7591700d538d08f2e8327bb439b6cb0488e13f3e
> 	:100644 100644 1b4afd2e6ca089de0babdacc5781426ef118da5c 40aaeb204dc04d3cf15c060133f65538b43b13b0 M	lib/Kconfig.debug
> 
> 	commit 7591700d538d08f2e8327bb439b6cb0488e13f3e
> 	Author: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> 	Date:   Wed Aug 4 08:52:56 2010 +0200
> 
> 	    wip: enable DEBUG_SECTION_MISMATCH
> 
> 	diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> 	index 1b4afd2..40aaeb2 100644
> 	--- a/lib/Kconfig.debug
> 	+++ b/lib/Kconfig.debug
> 	@@ -1,1157 +0,0 @@
> 	-
> 	-config PRINTK_TIME
> 	-	bool "Show timing information on printks"
> 	-	depends on PRINTK
> 	-	help
> 	-	  Selecting this option causes timing information to be
> 	-	  included in printk output.  This allows you to measure
> 	-	  the interval between kernel operations, including bootup
> 	-	  operations.  This is useful for identifying long delays
> 
> So format-patch assumes that lib/Kconfig.debug became empty because of
> not knowing what 40aaeb204dc04d3cf15c060133f65538b43b13b0 is.
> 
> So it's not git-bundle/git-fetch that is broken, but format-patch.
> 
> I attached an archive with the two objects
> 16edb8381f2f2dabec9cc59f4a3d8c9ead899668 and
> 09b3f464a50111071f7740056b98fa8f36133347 and will try to recreate
> 40aaeb204dc04d3cf15c060133f65538b43b13b0 now.
That was easy:

	git hash-object -w lib/Kconfig.debug

Now git bundle works again.

Nicolas: I forgot to say, that I needed a pristine clone of Linus' repo
as alternate to get it running.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
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]