diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-08-19 11:58:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-19 11:58:18 -0700 |
commit | 06bb643b72cc6c67d7c0ac9b8d923463bae68822 (patch) | |
tree | ab52ede9b662ee7e1c300ebfba6a13fd3d47dc91 /attr.h | |
parent | Git 1.7.6 (diff) | |
download | tgif-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 'attr.h')
0 files changed, 0 insertions, 0 deletions