From: Junio C Hamano <gitster@pobox.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: What's cooking in git.git (Dec 2011, #02; Mon, 5)
Date: Thu, 08 Dec 2011 10:19:16 -0800 [thread overview]
Message-ID: <7vzkf3hqor.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CALkWK0nNtvrLHxQv17jfrFQ=BcwLfgh7eE9X-nDCCYY0nsOskg@mail.gmail.com> (Ramkumar Ramachandra's message of "Wed, 7 Dec 2011 02:00:52 +0530")
Ramkumar Ramachandra <artagnon@gmail.com> writes:
>> * On "revert: make commit subjects in insn sheet optional"
>>
>> After finding the verb and advancing the pointer "bol" at the beginning of
>> the object name, end_of_object_name variable points at the first SP or LF
>> using strcspn(bol, " \n"), but I wonder why we are not grabbing a run of
>> hexdigits instead, i.e. strspn(bol, "0123456789abcdef"). Is this so that
>> we can allow something like "pick rr/revert-cherry-pick~3"?
>
> Yes, it is exactly for that reason :)
That is not explained in the commit message, which in itself is a problem
that needs to be addressed, but ...
>> I also wonder if this should be (sorry for pcre) "(pick|revert)\s+(\S+)\s"
>> instead, i.e. allow users with fat fingers to use one or more SP or even HT
>> to separate the verb and the operand.
>
> Hm, I'm not too enthusiastic about this change, because we don't
> advertise hand-editing the instruction sheet yet:...
... is inconsistent with the above.
If you plan to later allow editing and if you know what kind of editing
you are going to allow, it would be better to prepare the parser to accept
input with a reasonable slack, especially because you are already touching
it in this series anyway.
On the other hand, if you do not want to think about (or do not want us to
get distracted by thinking about) allowing editing in this series, which
is also a sensible stance to take, the parser should be made to accept
only what the mechanism in the series would produce and error out
otherwise, leaving the entire "the user now can edit and here are the rules"
part for a separate series that comes after this series is perfected.
>> * On "revert: allow mixed pick and revert instructions"
>>
>> Reporting what we did not understand from parse_insn_line() is a good
>> idea, but I think the line number should be reported at the beginning
>> of the same line.
>
> Makes sense. Do you like this?
Not particularly.
> - return error(_("Unrecognized action: %.*s"), (int)len, bol);
> + return error(_("Line %d: Unrecognized action: %.*s"),
It may be just me, but personally I prefer to see which file of what line
had the problem, i.e. "%s:%d: Unrecognized action:%s".
But if there is not much point in reporting the filename because it always
is the same, "Unrecognized action (line %d): %s" would also be fine.
next prev parent reply other threads:[~2011-12-08 18:19 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-06 5:01 What's cooking in git.git (Dec 2011, #02; Mon, 5) Junio C Hamano
2011-12-06 5:35 ` Ramkumar Ramachandra
2011-12-06 18:20 ` Junio C Hamano
2011-12-06 20:30 ` Ramkumar Ramachandra
2011-12-07 10:08 ` &&-chaining tester Jonathan Nieder
2011-12-07 19:36 ` Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 01/15] t1013 (loose-object-format): fix && chaining Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 02/15] t1300 (repo-config): " Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 03/15] t1412 (reflog-loop): " Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 04/15] t1007 (hash-object): " Ramkumar Ramachandra
2011-12-07 21:47 ` Jonathan Nieder
2011-12-08 4:42 ` Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 05/15] t1510 (repo-setup): " Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 06/15] t1511 (rev-parse-caret): " Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 07/15] t1510 (worktree): " Ramkumar Ramachandra
2011-12-07 21:51 ` Jonathan Nieder
2011-12-08 4:39 ` Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 08/15] t3200 (branch): " Ramkumar Ramachandra
2011-12-07 21:55 ` Jonathan Nieder
2011-12-08 4:47 ` Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 09/15] t3418 (rebase-continue): " Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 10/15] t3400 (rebase): " Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 11/15] t3310 (notes-merge-manual-resolve): " Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 12/15] t3419 (rebase-patch-id): " Ramkumar Ramachandra
2011-12-07 19:36 ` [PATCH 13/15] t3030 (merge-recursive): use test_expect_code Ramkumar Ramachandra
2011-12-07 21:57 ` Jonathan Nieder
2011-12-07 19:36 ` [PATCH 14/15] t1006 (cat-file): use test_cmp Ramkumar Ramachandra
2011-12-07 22:01 ` Jonathan Nieder
2011-12-07 19:36 ` [PATCH 15/15] t3040 (subprojects-basic): modernize style Ramkumar Ramachandra
2011-12-07 22:21 ` Jonathan Nieder
2011-12-08 13:04 ` Ramkumar Ramachandra
2011-12-08 8:06 ` &&-chaining tester Matthieu Moy
2011-12-08 18:19 ` Junio C Hamano [this message]
2011-12-06 5:52 ` What's cooking in git.git (Dec 2011, #02; Mon, 5) Jeff King
2011-12-06 11:22 ` Erik Faye-Lund
2011-12-06 18:52 ` Jeff King
2011-12-08 19:44 ` Erik Faye-Lund
2011-12-08 21:25 ` Junio C Hamano
2011-12-06 18:35 ` Junio C Hamano
2011-12-06 18:47 ` Jeff King
2011-12-06 11:20 ` Nguyen Thai Ngoc Duy
2011-12-06 19:10 ` Junio C Hamano
2011-12-06 14:01 ` Nguyen Thai Ngoc Duy
2011-12-06 19:12 ` Junio C Hamano
2011-12-06 21:12 ` Luke Diamand
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=7vzkf3hqor.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.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).