Re: [PATCH 5/6] git-reflog: add create and exists functions

2015-06-25 Thread David Turner
On Thu, 2015-06-25 at 11:35 -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > Now, going back to 4/6, I think create_reflog() function as an > > external API has a few problems. > > > > * Its name does not tell us what should happen when a reflog > >already exists for the refname t

Re: [PATCH 5/6] git-reflog: add create and exists functions

2015-06-25 Thread Junio C Hamano
Junio C Hamano writes: > Now, going back to 4/6, I think create_reflog() function as an > external API has a few problems. > > * Its name does not tell us what should happen when a reflog >already exists for the refname the caller asked to "create" >reflog for. I understand that this on

Re: [PATCH 5/6] git-reflog: add create and exists functions

2015-06-25 Thread Junio C Hamano
David Turner writes: > These are necessary because ref backends manage reflogs. Because? Because with core.logAllRefUpdates set to false, creating or updating a ref would not log what is done to it, unless a reflog already exists for the ref. There are cases where

[PATCH 5/6] git-reflog: add create and exists functions

2015-06-24 Thread David Turner
These are necessary because ref backends manage reflogs. In a moment, we will use these functions to make git stash work with alternate ref backends. Signed-off-by: David Turner --- builtin/reflog.c | 81 +++- 1 file changed, 80 insertions(+),