diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2011-08-04 16:09:05 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-04 15:40:43 -0700 |
commit | 80e1f791883a9b6104a2a1f0149118ade1890f25 (patch) | |
tree | f1088afded23fb6896adf3290dfe4bd12eff4675 /git-gui/lib/branch_delete.tcl | |
parent | revert: Eliminate global "commit" variable (diff) | |
download | tgif-80e1f791883a9b6104a2a1f0149118ade1890f25.tar.xz |
revert: Introduce struct to keep command-line options
The current code uses a set of file-scope static variables to tell the
cherry-pick/ revert machinery how to replay the changes, and
initializes them by parsing the command-line arguments. In later
steps in this series, we would like to introduce an API function that
calls into this machinery directly and have a way to tell it what to
do. Hence, introduce a structure to group these variables, so that
the API can take them as a single replay_options parameter. The only
exception is the variable "me" -- remove it since it not an
independent option, and can be inferred from the action.
Unfortunately, this patch introduces a minor regression. Parsing
strategy-option violates a C89 rule: Initializers cannot refer to
variables whose address is not known at compile time. Currently, this
rule is violated by some other parts of Git as well, and it is
possible to get GCC to report these instances using the "-std=c89
-pedantic" option.
Inspired-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Jonathan Nieder <jrnieder@gmail.com>
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 'git-gui/lib/branch_delete.tcl')
0 files changed, 0 insertions, 0 deletions