summaryrefslogtreecommitdiff
path: root/git-gui/lib/commit.tcl
diff options
context:
space:
mode:
authorAhelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>2024-03-23 14:18:08 +0100
committerJunio C Hamano <gitster@pobox.com>2024-03-25 11:40:53 -0700
commit0d527842b7633091158450d4dcda3ceb3547a636 (patch)
tree70bdfe14d7749a003b8a717aec430839f0dfd11b /git-gui/lib/commit.tcl
parent3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0 (diff)
grep: improve errors for unmatched ( and )
Imagine you want to grep for (. Easy: $ git grep '(' fatal: unmatched parenthesis uhoh. This is plainly wrong. Unless you know specifically that (a) git grep has expression groups and '(' ... ')' are used for them. (b) you can use -e '(' to explicitly say '(' is what you are looking for, not the beginning of a group. Similarly, $ git grep ')' fatal: incomplete pattern expression: ) is somehow worse. ")" is a complete regular expression pattern. Of course, the error wants to say "group" here. In this case it is also not "incomplete", it is unmatched. Make them say $ ./git grep '(' fatal: unmatched ( for expression group $ ./git grep ')' fatal: incomplete pattern expression group: ) which are clearer in indicating that it is not the expression that is wrong (since no pattern had been parsed at all), but rather that it is been misconstrued as a grouping operator. Link: https://bugs.debian.org/1051205 Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/commit.tcl')
0 files changed, 0 insertions, 0 deletions