Commit a620046
diff: don't crash with empty argument to -G or -S
The pickaxe options, -G and -S, need either a regex or a string to look
through the history for. An empty value isn't very useful since it
would either match everything or nothing, and what's worse, we presently
crash with a BUG like so when the user provides one:
BUG: diffcore-pickaxe.c:241: should have needle under -G or -S
Since it's not very nice of us to crash and this wouldn't do anything
useful anyway, let's simply inform the user that they must provide a
non-empty argument and exit with an error if they provide an empty one
instead.
Reported-by: Jared Van Bortel <[email protected]>
Signed-off-by: brian m. carlson <[email protected]>
Acked-by: Elijah Newren <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent f93ff17 commit a620046
2 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5493 | 5493 | | |
5494 | 5494 | | |
5495 | 5495 | | |
| 5496 | + | |
| 5497 | + | |
5496 | 5498 | | |
5497 | 5499 | | |
5498 | 5500 | | |
| |||
5504 | 5506 | | |
5505 | 5507 | | |
5506 | 5508 | | |
| 5509 | + | |
| 5510 | + | |
5507 | 5511 | | |
5508 | 5512 | | |
5509 | 5513 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
96 | 112 | | |
97 | 113 | | |
98 | 114 | | |
| |||
0 commit comments