mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 15:52:02 +00:00

This updates to implementation of gitattribute macros to be much more similar to core git (albeit not 100%) and to handle expansion of macros within macros, etc. It also cleans up the refcounting usage with macros to be much cleaner. Also, this adds a new vector function `git_vector_insert_sorted()` which allows you to maintain a sorted list as you go. In order to write that function, this changes the function `git__bsearch()` to take a somewhat different set of parameters, although the core functionality is still the same.
25 lines
602 B
Plaintext
25 lines
602 B
Plaintext
* rootattr
|
|
root_test2 -rootattr
|
|
root_test3 !rootattr
|
|
binfile binary
|
|
abc foo bar baz
|
|
|
|
root_test2 multiattr
|
|
root_test3 multi2=foo
|
|
|
|
root_test3 multiattr=1 multiattr=2 multiattr=3 multi2=abc !multi2
|
|
root_test2 multiattr=string -multiattr
|
|
|
|
[attr]mymacro positive -negative !rootattr
|
|
macro* mymacro another=77
|
|
|
|
[attr]macro2 multi2 -multi2 multi3 !multi3 multi3=answer
|
|
macro* macro2 macro2 macro2
|
|
|
|
# let's try some malicious macro defs
|
|
[attr]firstmacro -thirdmacro -secondmacro
|
|
[attr]secondmacro firstmacro -firstmacro
|
|
[attr]thirdmacro secondmacro=hahaha
|
|
|
|
macro_bad firstmacro secondmacro thirdmacro
|