summaryrefslogtreecommitdiff
path: root/builtin/for-each-ref.c
diff options
context:
space:
mode:
authorLibravatar Martin von Zweigbergk <martinvonz@gmail.com>2013-01-14 21:47:45 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-01-15 09:38:08 -0800
commit01a19dfc1ac53011deef492b21e52bf7840cef49 (patch)
treef5e8f8b95e5015dab9b229f48a566a67d34bf5eb /builtin/for-each-ref.c
parentreset.c: move update_index_refresh() call out of read_from_tree() (diff)
downloadtgif-01a19dfc1ac53011deef492b21e52bf7840cef49.tar.xz
reset.c: move lock, write and commit out of update_index_refresh()
In preparation for the/a following patch, move the locking, writing and committing of the index file out of update_index_refresh(). The code duplication caused will soon be taken care of. What remains of update_index_refresh() is just one line, but it is still called from two places, so let's leave it for now. In the process, we expose and fix the minor UI bug that makes us print "Could not refresh index" when we fail to write the index file when invoked with a pathspec. Copy the error message from the pathspec-less codepath ("Could not write new index file."). Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/for-each-ref.c')
0 files changed, 0 insertions, 0 deletions