Re: [PATCH 6/6] sequencer: factor code out of revert builtin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder wrote:
> Ramkumar Ramachandra wrote:
>>   memset(&opts, 0, sizeof(opts));
>>   opts.command = REPLAY_CMD_FOO;
>>   opts.revisions = xmalloc(sizeof(*opts.revs));
>>   parse_args_populate_opts(argc, argv, &opts);
>>   init_revisions(opts.revs);
>>   sequencer_pick_revisions(&opts);
>
> Hm, I wonder if opts.command should be a string so each new caller
> does not have to add to the enum and switch statements...

The new caller would have to add enum and switch statements to define
a new action anyway, so I think this should be an enum too.

-- 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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]