Re: [PATCH 10/32] rev-list: support traversing in narrow repository mode

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

 



2010/8/24 Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>:
> In this mode, only trees within revs->narrow_prefix is traversed. This
> narrows down the whole repository to the given subtree. This mode will
> be used by upload-pack/pack-objects to create a narrow pack, and by
> all git operations in narrow repository (i.e. $GIT_DIR/narrow exists).

My fix-rev-list series I posted is going to cause a few conflicts with
this patch...

<snip>
> +               if (!subtree)
> +                       ;       /* no subtree restriction, go on */
> +               else if (S_ISDIR(entry.mode) &&
> +                        !strncmp(entry.path, subtree, subtree_len) &&
> +                        entry.path[subtree_len] == '\0')
> +                       ;       /* inside subtree, go on */

Instead of writing your own comparison code, you may want to consider
using tree_entry_interesting() here.  That would also provide you with
a natural extension to multiple subtrees, rather than your currently
hardcoded single tree.  You may want to take a look at
tree-diff.c:show_tree() for inspiration here.
--
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]