Re: [PATCH v3 02/44] refs: make repack_without_refs and is_branch public

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

 



On Tue, 2015-10-13 at 09:23 +0200, Michael Haggerty wrote:
> On 10/13/2015 04:39 AM, Michael Haggerty wrote:
> > On 10/12/2015 11:51 PM, David Turner wrote:
> >> is_branch was already non-static, but this patch declares it in the
> >> header.
> >>
> >> Signed-off-by: Ronnie Sahlberg <sahlberg@xxxxxxxxxx>
> >> Signed-off-by: David Turner <dturner@xxxxxxxxxxxxxxxx>
> >> ---
> >> [...]
> > 
> > It seems odd that repack_without_refs() should be made public (and
> > ultimately end up in refs.h) given that it intrinsically only has to do
> > with file-based references. But I will read on...
> 
> I think the reason you needed to do this was because you wanted to move
> delete_refs() to the common code. It is true that delete_ref() can be
> moved to the common code. And most of the code in delete_refs() is just
> a loop calling delete_ref(). But delete_refs() also does the very
> files-specific optimization of calling repack_without_refs() before the
> loop. *That* call shouldn't be in the common code.
> 
> So my suggestion is that you write a common_delete_refs() function that
> only includes the loop over delete_ref(), and a files_delete_refs()
> function that is basically
> 
>     {
>             result = repack_without_refs(refnames, &err);
>             if (result) {
>                     ...report error...
>                     return result;
>             }
>             return common_delete_refs(...);
>     }

OK, I can do that.  That will have to be part of the backends work, so
I'll exclude it from the refs-backend-pre-vtable patch set.

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