git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] rev-list doesn't validate arguments to -n option
@ 2023-12-07 22:12 Britton Kerin
  2023-12-08 20:36 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Britton Kerin @ 2023-12-07 22:12 UTC (permalink / raw)
  To: git

It tolerates non-numeric arguments and garbage after a number:

For example:

$ # -n 1 means same as -n 0:
$ git rev-list -n q newest_commit
$ git rev-list -n 0 newest_commit
$ # Garbage after number is tolerated:
$ git rev-list -n 1q newest_commit
3be33f83695088d968cf084a1a08bdcde25a8d7a
$ git rev-list -n 2q newest_commit
3be33f83695088d968cf084a1a08bdcde25a8d7a
286e62e1b68e39334978e6222cbff187ecc17bcf

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-12 22:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-07 22:12 [BUG] rev-list doesn't validate arguments to -n option Britton Kerin
2023-12-08 20:36 ` Junio C Hamano
2023-12-08 22:35   ` [PATCH] revision: parse integer arguments to --max-count, --skip, etc., more carefully Junio C Hamano
2023-12-12  1:30     ` Jeff King
2023-12-12 15:09       ` Junio C Hamano
2023-12-12 22:05         ` Jeff King

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