From: Raman Gupta <rocketraman@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] contrib/rerere-train: optionally overwrite existing resolutions
Date: Fri, 28 Jul 2017 14:40:43 -0400 [thread overview]
Message-ID: <c522f452-0b30-3408-1673-8b62ffb7f039@gmail.com> (raw)
In-Reply-To: <xmqq60efq6bo.fsf@gitster.mtv.corp.google.com>
On 26/07/17 04:41 PM, Junio C Hamano wrote:
> Raman Gupta <rocketraman@gmail.com> writes:
>
>> On 26/07/17 02:05 PM, Junio C Hamano wrote:
>>> I haven't tried this patch, but would this work well with options
>>> meant for the 'git rev-list --parents "$@"' that grabs the list of
>>> merge commits to learn from? e.g.
>>>
>>> $ contrib/rerere-train.sh -n 4 --merges master
>>> $ contrib/rerere-train.sh --overwrite -n 4 --merges master
>>> $ contrib/rerere-train.sh -n 4 --overwrite --merges master
>>>
>>> I do not think it is necessary to make the last one work; as long as
>>> the first two work as expected, we are good even if the last one
>>> dies with a sensible message e.g. "options X, Y and Z must be given
>>> before other options" (currently "X, Y and Z" consists only of
>>> "--overwrite", but I think you get what I mean).
>>
>> You're right -- I didn't try all the cases. I wasn't able to figure
>> out how to get `rev-parse --parseopt` to deal with this situation, so
>> I did it manually. I'm not super-happy with the result, but it does
>> work. Look for PATCH v3.
>
> Yes, I think you could squash the two case arms in the later loop
> into one i.e.
>
> -h|--help|-o|--overwrite)
> die "please don't." ;;
I considered that but decided the non-collapsed version better
supports this list growing in the future.
> but still the repetition does look ugly.
Agreed.
> As a contrib/ material, I do not care too deeply about it, though.
>
> Will queue.
Thanks.
Regards,
Raman
next prev parent reply other threads:[~2017-07-28 18:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 14:34 [PATCH/RFC] contrib: rerere-train overwrites existing resolutions Raman Gupta
2017-07-25 21:18 ` Junio C Hamano
2017-07-25 22:48 ` [PATCH v2] contrib/rerere-train: optionally overwrite " Raman Gupta
2017-07-26 18:05 ` Junio C Hamano
2017-07-26 19:06 ` Raman Gupta
2017-07-26 20:41 ` Junio C Hamano
2017-07-28 18:40 ` Raman Gupta [this message]
2017-07-26 19:08 ` [PATCH v3] " Raman Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c522f452-0b30-3408-1673-8b62ffb7f039@gmail.com \
--to=rocketraman@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).