aboutsummaryrefslogtreecommitdiff
path: root/git_remote_helpers/git/importer.py
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-19 11:58:18 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-19 11:58:18 -0700
commit06bb643b72cc6c67d7c0ac9b8d923463bae68822 (patch)
treeab52ede9b662ee7e1c300ebfba6a13fd3d47dc91 /git_remote_helpers/git/importer.py
parentf696543dad6c7ba27b0c4fab167a5687263a9ba0 (diff)
downloadgit-06bb643b72cc6c67d7c0ac9b8d923463bae68822.tar.gz
git-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 'git_remote_helpers/git/importer.py')
0 files changed, 0 insertions, 0 deletions