Re: [PATCH] archive: let remote clients get reachable commits

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] archive: let remote clients get reachable commits

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:13

Sergey Sergeev [off-list ref] writes:

[jc: please do not top-post]
You are right,
I'll rethink this patch and write some test for this cases.
Thanks.

Note that this is harder to implement than one would naïvely think,
if one aims for a very generic solution, without walking the whole
history.

I personally think that it is OK to limit the scope to expressions
that start from the tip of ref and expressions that start with the
SHA-1 at the tip of ref, e.g.

    master~12:Documentation
    v2.6.11:arch/alpha
    5dc01c595e6c6ec9ccda	# tag v2.6.11
    26791a8bcf0e6d33f43a:arch	# tag v2.6.12
    26791a8bcf0~12:arch		# starting at 26791a8b and dig down

are OK, while forbidding the following:

    c39ae07f393806ccf406        # tree of tag v2.6.11
    9ee1c939d1cb936b1f98	# commit v2.6.12^0
    9ee1c939d1cb936b1f98:	# tree of commit v2.6.12^0
    9ee1c939d1cb936b1f98:arch	# subtree of commit v2.6.12^0

which will make it significantly easier to implement the necessary
validation in a robust way.

Re: [PATCH] archive: let remote clients get reachable commits

From: Jeff King <hidden>
Date: 2016-06-15 22:56:13

On Fri, Feb 22, 2013 at 09:10:46AM -0800, Junio C Hamano wrote:
I personally think that it is OK to limit the scope to expressions
that start from the tip of ref and expressions that start with the
SHA-1 at the tip of ref, e.g.

    master~12:Documentation
    v2.6.11:arch/alpha
    5dc01c595e6c6ec9ccda	# tag v2.6.11
    26791a8bcf0e6d33f43a:arch	# tag v2.6.12
    26791a8bcf0~12:arch		# starting at 26791a8b and dig down

are OK, while forbidding the following:

    c39ae07f393806ccf406        # tree of tag v2.6.11
    9ee1c939d1cb936b1f98	# commit v2.6.12^0
    9ee1c939d1cb936b1f98:	# tree of commit v2.6.12^0
    9ee1c939d1cb936b1f98:arch	# subtree of commit v2.6.12^0

which will make it significantly easier to implement the necessary
validation in a robust way.
How are you proposing to verify master~12 in that example? Because
during parsing, it starts with "master", and we remember that? Or
because you are doing a reachability traversal on all refs after we
parse?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help