diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2011-08-04 16:09:04 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-04 15:40:42 -0700 |
commit | 708f9d96d95be7e9912eea8350fdf3f04484695f (patch) | |
tree | 96fc05edc024ba41c47a994701bdb8100dac8425 /t/t1002-read-tree-m-u-2way.sh | |
parent | revert: Rename no_replay to record_origin (diff) | |
download | tgif-708f9d96d95be7e9912eea8350fdf3f04484695f.tar.xz |
revert: Eliminate global "commit" variable
Functions which act on commits currently rely on a file-scope static
variable to be set before they're called. Consequently, the API and
corresponding callsites are ugly and unclear. Remove this variable
and change their API to accept the commit to act on as additional
argument so that the callsites change from looking like
commit = prepare_a_commit();
act_on_commit();
to looking like
commit = prepare_a_commit();
act_on_commit(commit);
This change is also in line with our long-term goal of exposing some
of these functions through a public API.
Inspired-by: Christian Couder <chriscool@tuxfamily.org>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1002-read-tree-m-u-2way.sh')
0 files changed, 0 insertions, 0 deletions