diff options
author | Patrick Steinhardt <ps@pks.im> | 2023-05-10 14:34:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-05-10 10:35:25 -0700 |
commit | cdc034a0ac64363b5d603b24ea7226cef2f429e3 (patch) | |
tree | 0483bbb82cdac2cf983a4d83ce1eb147d7073aee /Documentation/git-fetch.txt | |
parent | 58afbe885c678c5cc6f6f83badca159871fc2cb3 (diff) | |
download | git-cdc034a0ac64363b5d603b24ea7226cef2f429e3.tar.gz |
fetch: move option related variables into main function
The options of git-fetch(1) which we pass to `parse_options()` are
declared globally in `builtin/fetch.c`. This means we're forced to use
global variables for all the options, which is more likely to cause
confusion than explicitly passing state around.
Refactor the code to move the options into `cmd_fetch()`. Move variables
that were previously forced to be declared globally and which are only
used by `cmd_fetch()` into function-local scope.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-fetch.txt')
0 files changed, 0 insertions, 0 deletions