From: Junio C Hamano <gitster@pobox.com>
To: David Turner <dturner@twopensource.com>
Cc: git@vger.kernel.org, mhagger@alum.mit.edu
Subject: Re: [PATCH v2 2/6] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs
Date: Thu, 25 Jun 2015 14:11:57 -0700 [thread overview]
Message-ID: <xmqqsi9fwl0i.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1435265110-6414-2-git-send-email-dturner@twopensource.com> (David Turner's message of "Thu, 25 Jun 2015 16:45:06 -0400")
David Turner <dturner@twopensource.com> 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@twopensource.com>
> ---
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.
next prev parent reply other threads:[~2015-06-25 21:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 20:45 [PATCH v2 1/6] refs.c: add err arguments to reflog functions David Turner
2015-06-25 20:45 ` [PATCH v2 2/6] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs David Turner
2015-06-25 21:11 ` Junio C Hamano [this message]
2015-06-25 22:29 ` David Turner
2015-06-25 20:45 ` [PATCH v2 3/6] bisect: use refs infrastructure for BISECT_START David Turner
2015-06-25 20:52 ` Junio C Hamano
2015-06-25 23:21 ` David Turner
2015-06-26 0:22 ` David Turner
2015-06-25 20:45 ` [PATCH v2 4/6] refs: add safe_create_reflog function David Turner
2015-06-25 21:02 ` Junio C Hamano
2015-06-25 20:45 ` [PATCH v2 5/6] git-reflog: add create and exists functions David Turner
2015-06-25 21:01 ` Junio C Hamano
2015-06-25 21:51 ` David Turner
2015-06-25 20:45 ` [PATCH v2 6/6] git-stash: use git-reflog instead of creating files David Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsi9fwl0i.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=dturner@twopensource.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.