Git development
 help / color / mirror / Atom feed
* [Outreachy PATCH] t1402: test --no-allow-onelevel option precedence
@ 2026-10-26 13:25 Fien Dora
  2026-10-26 21:06 ` Junio C Hamano
  2026-10-27 14:54 ` [Outreachy PATCH v2] " Fien Dora
  0 siblings, 2 replies; 10+ messages in thread
From: Fien Dora @ 2026-10-26 13:25 UTC (permalink / raw)
  To: git; +Cc: christian.couder, siddharthasthana31, phillip.wood123

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 <fiendora5@gmail.com>
---
 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)


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

end of thread, other threads:[~2026-10-29 12:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26 13:25 [Outreachy PATCH] t1402: test --no-allow-onelevel option precedence Fien Dora
2026-10-26 21:06 ` Junio C Hamano
2026-10-27 11:56   ` Fien Dora
2026-10-27 16:29     ` Junio C Hamano
2026-10-28 19:49       ` Fien Dora
2026-10-28 20:00       ` Fien Dora
2026-10-27 14:54 ` [Outreachy PATCH v2] " Fien Dora
2026-10-27 17:59   ` Junio C Hamano
2026-10-28 20:22     ` Fien Dora
2026-10-29 12:17   ` [Outreachy PATCH v3] " Fien Dora

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox