Hi, Jonathan Nieder writes: > Ramkumar Ramachandra wrote: >> The variable "me" is left as a file-scope static variable because it >> is not an independent option. "me" is simply a string that needs to >> be inferred from the "action" option, and is kept global to save each >> function the trouble of determining it independently. > > Why not do something like this[1]? > > [1] http://thread.gmane.org/gmane.comp.version-control.git/176647/focus=176730 Fixed and rebased all. Thanks. 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. -- Ram -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html