summaryrefslogtreecommitdiff
path: root/date.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-08-19 11:58:18 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-08-19 11:58:18 -0700
commit06bb643b72cc6c67d7c0ac9b8d923463bae68822 (patch)
treeab52ede9b662ee7e1c300ebfba6a13fd3d47dc91 /date.c
parentGit 1.7.6 (diff)
downloadtgif-06bb643b72cc6c67d7c0ac9b8d923463bae68822.tar.xz
commit: reduce use of redundant global variables
The file-scope global variable head_sha1[] was used to hold the object name of the current HEAD commit (unless we are about to make an initial commit). Also there is an independent "static int initial_commit". Fix all the functions on the call-chain that use these two variables to take a new "(const) struct commit *current_head" argument instead, and replace their uses, e.g. "if (initial_commit)" becomes "if (!current_head)" and a reference to "head_sha1" becomes "current_head->object.sha1". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'date.c')
0 files changed, 0 insertions, 0 deletions