Thread (37 messages) flat view 37 messages, 5 authors, 2016-06-15

Re: [PATCH 4/8] revert: Separate cmdline argument handling from the functional code

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:51:14

Ramkumar Ramachandra wrote:
Ramkumar Ramachandra writes:
quoted
quoted
Ramkumar Ramachandra wrote:
quoted
quoted
quoted
+++ b/builtin/revert.c
@@ -603,19 +603,12 @@ static int read_and_refresh_cache(struct replay_opts *opts)
 	return 0;
 }
 
-static int revert_or_cherry_pick(int argc, const char **argv,
-				struct replay_opts *opts)
+static int pick_commits(struct replay_opts *opts)
 {
[...]
quoted
quoted
quoted
-	setenv(GIT_REFLOG_ACTION, me, 0);
-	parse_args(argc, argv, opts);
-
 	if (opts->allow_ff) {
[...]
quoted
Nice catch! Yes, GIT_REFLOG_ACTION should be in pick_commits.
Er, I mean in do_pick_commit.  Right?
It seems somehow cleaner to set the envvar once in pick_commits,
assuming do_pick_commit is a private function that won't be exported.
But either way sounds fine to me.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help