Re: [PATCH 4/5] allow deepening of a shallow repository

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

 



Hi,

On Fri, 17 Nov 2006, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> > Yes. Somehow, an important part of unregister_shallow() went missing (yet 
> > another proof that my poor-man's-StGit does not always work). I think that 
> > the "object->parsed = 0;" should go into unregister_shallow() like this:
> 
> That does not fly so well.  Your fetch-pack.c does this in
> find_common() and dropping the parsed flag inside unregister
> causes it to be parsed again later with its true parents, which
> defeats what the commented part of the code wanted to do.
> 
> 	if (!lookup_object(sha1))
> 		die("object not found: %s", line);
> 	/* make sure that it is parsed as shallow */
> 	parse_object(sha1);
> 	if (unregister_shallow(sha1))
> 		die("no shallow found: %s", line);
> 	continue;

Ah! _That_ was the reason I removed it from unregister_shallow().

> Although I am reasonably sure we can eventually make it work, it
> is very subtle and fragile -- somebody touching this code can
> easily break it.

I fully agree. Even the OA did not understand the code fully ;-)

How about adding "int force_reparse" to the signature of 
unregister_shallow()? (Just like we added "int cleanup" to 
get_merge_bases() to avoid pilot errors.)

Ciao,
Dscho

-
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]