Re: [PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-17 Thread Jeff King
On Fri, Feb 17, 2017 at 06:40:28PM -0500, Kyle Meyer wrote: > > For reference, the two things I notice are: > > > > - we prefer test_path_is_missing to "! test -f" these days. > > > > - we don't redirect the output of grep (it's handled already in > > non-verbose mode, and in verbose mode

Re: [PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-17 Thread Kyle Meyer
Jeff King writes: [...] >> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh >> index b0ffc0b57..65918d984 100755 >> --- a/t/t1400-update-ref.sh >> +++ b/t/t1400-update-ref.sh >> @@ -85,6 +85,15 @@ test_expect_success "delete $m (by HEAD)" ' >> ' >> rm -f .git/$m >>

Re: [PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-17 Thread Junio C Hamano
Jeff King writes: > ... All good review comments. I briefly wondered if recording the deletion of the current branch in HEAD's reflog has much practical values (Porcelain "git branch" would not even allow deletion in the first place), but because it is a rare and unusual event,

Re: [PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-17 Thread Jeff King
On Thu, Feb 16, 2017 at 10:57:59PM -0500, Kyle Meyer wrote: > Now that delete_refs() accepts a reflog message, pass the > user-provided message to delete_refs() rather than silently dropping > it. The doesn't matter for the deleted ref's log because the log is > deleted along with the ref, but

[PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-16 Thread Kyle Meyer
Now that delete_refs() accepts a reflog message, pass the user-provided message to delete_refs() rather than silently dropping it. The doesn't matter for the deleted ref's log because the log is deleted along with the ref, but this entry will show up in HEAD's reflog when deleting a checked out