Re: [PATCH v2 2/6] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

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

 



David Turner <dturner@xxxxxxxxxxxxxxxx> writes:

> Instead of directly writing to and reading from files in
> $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD
> and REVERT_HEAD.
>
> Signed-off-by: David Turner <dturner@xxxxxxxxxxxxxxxx>
> ---

I may have said this already in the last round, but I cannot shake
off the feeling that this patch is doing two completely unrelated
things at once.

The change to refs.c that introduced the should_autocreate_reflog()
helper (which is a good idea even without any other changes in this
patch) and then using that to commit_ref_update() does not have
anything to do with CHERRY_PICK_HEAD/REVERT_HEAD, does it?

 * commit_ref_update() gained a new "flags" parameter, but it does
   not seem to be used at all.  Why?

 * Why is it a good idea to move the "does the log exist or should
   we auto-create?" check from log_ref_setup() to
   commit_ref_update()?

These are not just unexplained, but does not have anything to do
with using ref API to write and read CHERRY_PICK_HEAD/REVERT_HEAD.

They _might_ be a prerequisite, but it is not clear why.  I suspect
that you do not have to touch refs.c at all for the purpose of the
"theme" of the patch explained by the "Subject" line.
--
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]