Re: [RFC PATCH 06/15] Automatically reuse sparse limiting arguments in revision walking

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

 



On Sun, Sep 5, 2010 at 10:13 AM, Elijah Newren <newren@xxxxxxxxx> wrote:
> In a sparse repository, by automatically making use of sparse limits
> specified at clone time, we can avoid walking uninteresting commits and
> prevent access to missing trees and blobs.  Note that this means that if
> you created a sparse clone with
>  git clone <repo> <dest_dir> -- PATH1 PATH2 PATH3 PATH4 PATH5
> then
>  git log
> implicitly runs as though you had manually specified
>  git log -- PATH1 PATH2 PATH3 PATH4 PATH5
> Similarly, running
>  git diff
> implicitly runs as though you had manually specified
>  git diff -- PATH1 PATH2 PATH3 PATH4 PATH5
>
> This is necessary for proper operation of git diff in a sparse clone to
> avoid accessing missing objects.  In the case of a plain git log, this
> merely serves as an additional convenience, but for more complicated log
> operations (e.g. when passing -p or -S options) it becomes necessary.

I have a nicer approach here. Instead of modifying setup_revisions()
and similar functions, I update get_pathspec() to rewrite the
pathspecs from command line in narrow/shallow repos. get_pathspec()
currently does some form of rewriting already (prepending prefix).

So if you do "git log", get_pathspec() would return "git log -- PATH1
PATH2...". Will repost my series soon, or I can send that particular
patch to you.
-- 
Duy
--
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]