checkout: respect GIT_REFLOG_ACTION
commit3bed291a3b121408b4de83f4fa3cc0f1d98c676e
authorRamkumar Ramachandra <artagnon@gmail.com>
Sun, 16 Jun 2013 08:45:16 +0000 (16 14:15 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Jun 2013 17:05:40 +0000 (17 10:05 -0700)
tree16f042d3e943d922e5c9b007783cb109740b941b
parentec5063106449aa8c6623abbdcca862dd1516c920
checkout: respect GIT_REFLOG_ACTION

GIT_REFLOG_ACTION is an environment variable specifying the reflog
message to write after an action is completed.  Several other commands
including merge, reset, and commit respect it.

Fix the failing tests in t/checkout-last by making checkout respect it
too.  You can now expect

  $ git checkout -

to work as expected after any operation that internally uses "checkout"
as its implementation detail, e.g. "rebase".

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c
t/t2012-checkout-last.sh