From: Fien Dora Date: Mon, 26 Oct 2026 13:25:25 GMT Subject: [Outreachy PATCH] t1402: test --no-allow-onelevel option precedence Message-ID: <20261026132525.45414-1-fiendora5@gmail.com> Git allows later command-line options to override earlier ones. Added tests to verify that --no-allow-onelevel overrides --allow-onelevel and vice versa. This ensures that the expected behavior is preserved if the argument-parsing code changes in the future. Signed-off-by: Fien Dora --- t/t1402-check-ref-format.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh index 9dd64662b2..6036df0210 100755 --- a/t/t1402-check-ref-format.sh +++ b/t/t1402-check-ref-format.sh @@ -74,6 +74,8 @@ invalid_ref 'heads/foo*/bar*' --refspec-pattern ref='foo' invalid_ref "$ref" valid_ref "$ref" --allow-onelevel +invalid_ref "$ref" '--allow-onelevel --no-allow-onelevel' +valid_ref "$ref" '--no-allow-onelevel --allow-onelevel' invalid_ref "$ref" --refspec-pattern valid_ref "$ref" '--refspec-pattern --allow-onelevel' invalid_ref "$ref" --normalize -- 2.50.1 (Apple Git-155)