refs.c: change read_ref_at to use the reflog iterators
commit4207ed285f31ad3e04f08254237c0c1a1609642b
authorRonnie Sahlberg <sahlberg@google.com>
Tue, 3 Jun 2014 16:09:59 +0000 (3 09:09 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2014 18:09:32 +0000 (3 11:09 -0700)
tree2a44eeed8586b602c6e512c5e46944079e296e46
parente156455ea49124c140a67623f22a393db62d5d98
refs.c: change read_ref_at to use the reflog iterators

read_ref_at has its own parsing of the reflog file for no really good reason
so lets change this to use the existing reflog iterators. This removes one
instance where we manually unmarshall the reflog file format.

Remove the now redundant ref_msg function.

Log messages for errors are changed slightly. We no longer print the file
name for the reflog, instead we refer to it as 'Log for ref <refname>'.
This might be a minor useability regression, but I don't really think so, since
experienced users would know where the log is anyway and inexperienced users
would not know what to do about/how to repair 'Log ... has gap ...' anyway.

Adapt the t1400 test to handle the change in log messages.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
t/t1400-update-ref.sh