Re: [PATCH v3] rerere: Expose an API corresponding to 'clear' functionality

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

 



Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes:

> Libify the "rerere clear" into a simple function called rerere_clear
> that takes no arguments, and returns the exit status.  Also export
> unlink_rr_item as unlink_rerere_item so rerere_clear and the
> un-libified "git rerere gc" can both use it.
>
> Helped-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
> Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
> ---
>  What changed since v2: Jonathan's review.

Are you sure this is the version you wanted to send?

You now return -1 from rerere_clear() when setup_rerere() says that the
feature is not enabled, and this is propagated back to cmd_rerere(),
causing the whole command to report a failure in its exit status, which
seems to me a grave regression.  Your previous round got this part right,
but it is broken in this round.

Also I seem to recall that Jonathan suggested that you do not have to
expose unlink_rr_item() as an external symbol if you moved the garbage
collection part from builtin/rerere.c to rerere.c but I do not see such a
change in this patch.  I think the gc interface is a lot more reasonable
API to expose to external callers ("git gc" may want to make an internal
call to rerere_gc() moved to rerere.c, instead of spawning "git rerere gc"
as an external command) than unlink_rerere_item() that is only useful for
callers that are deep inside rerere specific codepath.

What is going on?
--
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]