[PATCH v5 2/7] ref-filter: add function to print single ref_array_item

2017-01-15 Thread santiago
From: Lukas Puehringer ref-filter functions are useful for printing git object information using a format specifier. However, some other modules may not want to use this functionality on a ref-array but only print a single item. Expose a pretty_print_ref function to create, pretty print and free

[PATCH v5 5/7] builtin/tag: add --format argument for tag -v

2017-01-15 Thread santiago
From: Lukas Puehringer Adding --format to git tag -v mutes the default output of the GPG verification and instead prints the formatted tag object. This allows callers to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. The callback functio

[PATCH v5 1/7] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2017-01-15 Thread santiago
From: Lukas Puehringer Functions that print git object information may require that the gpg-interface functions be silent. Add GPG_VERIFY_QUIET flag and prevent print_signature_buffer from being called if flag is set. Signed-off-by: Lukas Puehringer --- gpg-interface.h | 1 + tag.c |

[PATCH v5 6/7] t/t7030-verify-tag: Add --format specifier tests

2017-01-15 Thread santiago
From: Santiago Torres Verify-tag now provides --format specifiers to inspect and ensure the contents of the tag are proper. We add two tests to ensure this functionality works as expected: the return value should indicate if verification passed, and the format specifiers must be respected

[PATCH v5 7/7] t/t7004-tag: Add --format specifier tests

2017-01-15 Thread santiago
From: Santiago Torres tag -v now supports --format specifiers to inspect the contents of a tag upon verification. Add two tests to ensure this behavior is respected in future changes. Signed-off-by: Santiago Torres --- t/t7004-tag.sh | 16 1 file changed, 16 insertions

[PATCH v5 0/7] Add --format to tag verification

2017-01-15 Thread santiago
From: Santiago Torres This is the fifth iteration of [1][2][3][4], and as a result of the discussion in [5]. The main goal of this patch series is to bring --format to git tag verification so that upper-layer tools can inspect the content of a tag and make decisions based on it. In this re-woll

[PATCH v5 3/7] tag: add format specifier to gpg_verify_tag

2017-01-15 Thread santiago
From: Lukas Puehringer Calling functions for gpg_verify_tag() may desire to print relevant information about the header for further verification. Add an optional format argument to print any desired information after GPG verification. Signed-off-by: Lukas Puehringer --- builtin/tag.c|

[PATCH v5 4/7] builtin/verify-tag: add --format to verify-tag

2017-01-15 Thread santiago
From: Santiago Torres Callers of verify-tag may want to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. This is to avoid tag refs that point to an incorrect object. Add a --format parameter to git verify-tag to print the formatted tag

[PATCH v6 0/6] Add --format to tag verification

2017-01-17 Thread santiago
From: Santiago Torres This is the sixth iteration of [1][2][3][4][5], and as a result of the discussion in [5]. The main goal of this patch series is to bring --format to git tag verification so that upper-layer tools can inspect the content of a tag and make decisions based on it. In this re

[PATCH v6 5/6] t/t7030-verify-tag: Add --format specifier tests

2017-01-17 Thread santiago
From: Santiago Torres Verify-tag now provides --format specifiers to inspect and ensure the contents of the tag are proper. We add two tests to ensure this functionality works as expected: the return value should indicate if verification passed, and the format specifiers must be respected

[PATCH v6 4/6] builtin/tag: add --format argument for tag -v

2017-01-17 Thread santiago
From: Lukas Puehringer Adding --format to git tag -v mutes the default output of the GPG verification and instead prints the formatted tag object. This allows callers to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. The callback functio

[PATCH v6 3/6] builtin/verify-tag: add --format to verify-tag

2017-01-17 Thread santiago
From: Santiago Torres Callers of verify-tag may want to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. This is to avoid tag refs that point to an incorrect object. Add a --format parameter to git verify-tag to print the formatted tag

[PATCH v6 1/6] gpg-interface,tag: add GPG_VERIFY_OMIT_STATUS flag

2017-01-17 Thread santiago
From: Lukas Puehringer Functions that print git object information may require that the gpg-interface functions be silent. Add GPG_VERIFY_OMIT_STATUS flag and prevent print_signature_buffer from being called if flag is set. Signed-off-by: Lukas Puehringer --- gpg-interface.h | 5 +++-- tag.c

[PATCH v6 2/6] ref-filter: add function to print single ref_array_item

2017-01-17 Thread santiago
From: Lukas Puehringer ref-filter functions are useful for printing git object information using a format specifier. However, some other modules may not want to use this functionality on a ref-array but only print a single item. Expose a pretty_print_ref function to create, pretty print and free

[PATCH v6 6/6] t/t7004-tag: Add --format specifier tests

2017-01-17 Thread santiago
From: Santiago Torres tag -v now supports --format specifiers to inspect the contents of a tag upon verification. Add two tests to ensure this behavior is respected in future changes. Signed-off-by: Santiago Torres --- t/t7004-tag.sh | 16 1 file changed, 16 insertions

[PATCH v4 3/7] tag: add format specifier to gpg_verify_tag

2016-10-07 Thread santiago
From: Lukas Puehringer Calling functions for gpg_verify_tag() may desire to print relevant information about the header for further verification. Add an optional format argument to print any desired information after GPG verification. Signed-off-by: Lukas Puehringer --- builtin/tag.c|

[PATCH v4 4/7] builtin/verify-tag: add --format to verify-tag

2016-10-07 Thread santiago
From: Santiago Torres Callers of verify-tag may want to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. This is to avoid tag refs that point to an incorrect object. Add a --format parameter to git verify-tag to print the formatted tag

[PATCH v4 1/7] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2016-10-07 Thread santiago
From: Lukas Puehringer Functions that print git object information may require that the gpg-interface functions be silent. Add GPG_VERIFY_QUIET flag and prevent print_signature_buffer from being called if flag is set. Signed-off-by: Lukas Puehringer --- gpg-interface.h | 1 + tag.c |

[PATCH v4 2/7] ref-filter: add function to print single ref_array_item

2016-10-07 Thread santiago
From: Lukas Puehringer ref-filter functions are useful for printing git object information using a format specifier. However, some other modules may not want to use this functionality on a ref-array but only print a single item. Expose a pretty_print_ref function to create, pretty print and free

[PATCH v4 0/7] Add --format to tag verification

2016-10-07 Thread santiago
From: Santiago Torres This is the fourth iteration of the series in [1][2][3], which comes as a result of the discussion in [4]. The main goal of this patch series is to bring --format to git tag verification so that upper-layer tools can inspect the content of a tag and make decisions based on

[PATCH v4 6/7] t/t7030-verify-tag: Add --format specifier tests

2016-10-07 Thread santiago
From: Santiago Torres Verify-tag now provides --format specifiers to inspect and ensure the contents of the tag are proper. We add two tests to ensure this functionality works as expected: the return value should indicate if verification passed, and the format specifiers must be respected

[PATCH v4 5/7] builtin/tag: add --format argument for tag -v

2016-10-07 Thread santiago
From: Lukas Puehringer Adding --format to git tag -v mutes the default output of the GPG verification and instead prints the formatted tag object. This allows callers to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. The callback functio

[PATCH v4 7/7] t/t7004-tag: Add --format specifier tests

2016-10-07 Thread santiago
From: Santiago Torres tag -v now supports --format specifiers to inspect the contents of a tag upon verification. Add two tests to ensure this behavior is respected in future changes. Signed-off-by: Santiago Torres --- t/t7004-tag.sh | 16 1 file changed, 16 insertions

[RFC/PATCH] verify-tag: add --check-name flag

2016-06-07 Thread santiago
From: Santiago Torres Hello everyone, In a previous thread [1] we discussed about the possibility of having a --check-name flag, for the tag-verify command (and possibly git tag -v). Although many points were in the table, I don't think that it was conclusive as to whether having it o

[RFC/PATCH 0/6] Add --format to tag verification

2016-09-22 Thread santiago
From: Santiago Torres Hello everyone, This is a followup on [1]. There we discussed what would be the best way to provide automated scripts with mechanisms to inspect the contents of a tag upon verification. We struggled a little bit with how to make this fit the current git codebase in the

[PATCH 6/6] builtin/tag: add --format argument for tag -v

2016-09-22 Thread santiago
From: Lukas P Adding --format to git tag -v mutes the default output of the GPG verification and instead prints the formatted tag object. This allows callers to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. Signed-off-by: Lukas Puehrin

[PATCH 3/6] ref-filter: Expose wrappers for ref_item functions

2016-09-22 Thread santiago
From: Lukas P Ref-filter functions are useful for printing git object information without a format specifier. However, some functions may not want to use a complete ref-array, and just a single item instead. Expose create/show/free functions for ref_array_items through wrappers around the origina

[PATCH 4/6] tag: add format specifier to gpg_verify_tag

2016-09-22 Thread santiago
From: Lukas P Calling functions for gpg_verify_tag() may desire to print relevant information about the header for further verification. Add an optional format argument to print any desired information after GPG verification. Signed-off-by: Lukas Puehringer --- builtin/tag.c| 2 +- bu

[PATCH 1/6] builtin/tag: move format specifier to global var

2016-09-22 Thread santiago
From: Santiago Torres The format specifier will be likely used in other functions throughout git tag. One likely candidate to require format strings in the future is the gpg_verify_tag function. However, changing the signature of functions such as for_each_ref or verify_tag would be quite

[PATCH 2/6] gpg-interface: add GPG_VERIFY_QUIET flag

2016-09-22 Thread santiago
From: Lukas P Functions that print git object information may require that the gpg-interface functions be silent. Add a GPG_VERIFY_QUIET to prevent functions such as `print_signature_buffer` from printing any output and only return whether signature verification passed or not. Signed-off-by: Luk

[PATCH 5/6] builtin/verify-tag: Add --format to verify-tag

2016-09-22 Thread santiago
From: Santiago Torres Callers of verify-tag may want to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. This is to avoid tag refs that point to an incorrect object. Add a --format parameter to git verify-tag to print the formatted tag

[PATCH v2 3/5] tag: add format specifier to gpg_verify_tag

2016-09-26 Thread santiago
From: Lukas P Calling functions for gpg_verify_tag() may desire to print relevant information about the header for further verification. Add an optional format argument to print any desired information after GPG verification. Signed-off-by: Lukas P --- builtin/tag.c| 2 +- builtin/ver

[PATCH v2 1/5] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2016-09-26 Thread santiago
From: Lukas P Functions that print git object information may require that the gpg-interface functions be silent. Add GPG_VERIFY_QUIET flag and prevent print_signature_buffer from being called if flag is set. Signed-off-by: Lukas P --- gpg-interface.h | 1 + tag.c | 5 - 2 files

[PATCH v2 2/5] ref-filter: add function to print single ref_array_item

2016-09-26 Thread santiago
From: Lukas P ref-filter functions are useful for printing git object information using a format specifier. However, some other modules may not want to use this functionality on a ref-array but only print a single item. Expose a format_ref function to create, pretty print and free individual ref

[PATCH v2 5/5] builtin/tag: add --format argument for tag -v

2016-09-26 Thread santiago
From: Lukas P Adding --format to git tag -v mutes the default output of the GPG verification and instead prints the formatted tag object. This allows callers to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. Caveat: The change adds a for

[PATCH v2 4/5] builtin/verify-tag: add --format to verify-tag

2016-09-26 Thread santiago
From: Santiago Torres Callers of verify-tag may want to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. This is to avoid tag refs that point to an incorrect object. Add a --format parameter to git verify-tag to print the formatted tag

[PATCH v2 0/5] Add --format to tag verification

2016-09-26 Thread santiago
From: Santiago Torres This is the second iteration of [1], and as a result of the discussion in [2]. In this re-roll we: * Dropped the commit to move the format string parameter to a global variable on builtin/tag. We had to change the signature of for_each_name_fn to do this. * Fixed the

[PATCH v3 1/5] gpg-interface, tag: add GPG_VERIFY_QUIET flag

2016-09-30 Thread santiago
From: Lukas Puehringer Functions that print git object information may require that the gpg-interface functions be silent. Add GPG_VERIFY_QUIET flag and prevent print_signature_buffer from being called if flag is set. Signed-off-by: Lukas Puehringer --- gpg-interface.h | 1 + tag.c |

[PATCH v3 0/5] Add --format to tag verification

2016-09-30 Thread santiago
From: Santiago Torres This is the third iteration of [1][2], and as a result of the discussion in [3]. In this re-roll we: * Fixed all the signed-off-by's [0002] * Renamed the function format_ref to pretty_print_ref instead, which is a more descriptive name [0004] * Added the respe

[PATCH v3 4/5] builtin/verify-tag: add --format to verify-tag

2016-09-30 Thread santiago
From: Santiago Torres Callers of verify-tag may want to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. This is to avoid tag refs that point to an incorrect object. Add a --format parameter to git verify-tag to print the formatted tag

[PATCH v3 3/5] tag: add format specifier to gpg_verify_tag

2016-09-30 Thread santiago
From: Lukas P Calling functions for gpg_verify_tag() may desire to print relevant information about the header for further verification. Add an optional format argument to print any desired information after GPG verification. Signed-off-by: Lukas Puehringer --- builtin/tag.c| 2 +- bu

[PATCH v3 5/5] builtin/tag: add --format argument for tag -v

2016-09-30 Thread santiago
From: Lukas Puehringer Adding --format to git tag -v mutes the default output of the GPG verification and instead prints the formatted tag object. This allows callers to cross-check the tagname from refs/tags with the tagname from the tag object header upon GPG verification. The callback functio

[PATCH v3 2/5] ref-filter: add function to print single ref_array_item

2016-09-30 Thread santiago
From: Lukas Puehringer ref-filter functions are useful for printing git object information using a format specifier. However, some other modules may not want to use this functionality on a ref-array but only print a single item. Expose a format_ref function to create, pretty print and free indiv

[PATCH/RFC] builtin/tag: Changes argument format for verify

2016-02-26 Thread santiago
From: Santiago Torres The verify tag function converts the commit sha1 to hex and passes it as a command-line argument to builtin/verify-tag. Given that builtin/verify-tag already resolves the ref name sha1 equivalent, the sha1 to hex_sha1 conversion is unnecessary and the ref-name can be used

[PATCH/RFC] builtin/tag.c: move PGP verification inside builtin.

2016-03-24 Thread santiago
From: Santiago Torres The verify tag function is just a thin wrapper around the verify-tag command. We can avoid one fork call by doing the verification instide the tag builtin instead. Signed-off-by: Santiago Torres --- builtin/tag.c | 44 ++-- 1 file

[PATCH] tag.c: move PGP verification code from plumbing

2016-03-24 Thread santiago
From: Santiago Torres The verify tag function is just a thin wrapper around the verify-tag command. We can avoid one fork call by doing the verification inside the tag builtin instead. To do this, the run_pgp_verify() and verify_tag() functions are moved to tag.c. The definition of verify_tag

[PATCH v3 0/4] tag: move PGP verification code to tag.c

2016-04-02 Thread santiago
in verify-tag to gpg-interface v1: The verify tag function is just a thin wrapper around the verify-tag command. We can avoid one fork call by doing the verification inside the tag builtin instead. This applies on v2.8.0. Thanks! -Santiago [1] http://git.661346.n2.nabble.com/PATCH-RFC-builtin

[PATCH v3 2/4] t/t7030-verify-tag.sh: Adds validation for multiple tags

2016-04-02 Thread santiago
From: Santiago Torres The verify-tag command supports mutliple tag names as an argument. However, no previous tests try to verify multiple tags at once. This test runs the verify-tag command against three trusted tags (created previously), and ensures that: 1) Three tags are verified

[PATCH v3 4/4] tag: use pgp_verify_function in tag -v call

2016-04-02 Thread santiago
From: Santiago Torres Instead of running the verify-tag plumbing command, we use the pgp_verify_tag(). This avoids the usage of an extra fork call. To do this, we extend the number of parameters that tag.c takes, and verify-tag passes. Redundant calls done in the pgp_verify_tag function are

[PATCH v3 3/4] builtin/verify-tag: move verification code to tag.c

2016-04-02 Thread santiago
From: Santiago Torres The PGP verification routine for tags could be accessed by other commands that require it. We do this by moving it to the common tag.c code. We rename the verify_tag() function to pgp_verify_tag() to avoid conflicts with the mktag.c function. Signed-off-by: Santiago Torres

[PATCH v3 1/4] builtin/verify-tag.c: Ignore SIGPIPE on gpg-interface

2016-04-02 Thread santiago
From: Santiago Torres The verify_signed_buffer comand might cause a SIGPIPE signal when the gpg child process terminates early (due to a bad keyid, for example) and git tries to write to it afterwards. Previously, ignoring SIGPIPE was done on the builtin/gpg-verify.c command to avoid this issue

[PATCH v4 3/6] builtin/verify-tag: move verification code to tag.c

2016-04-04 Thread santiago
From: Santiago Torres The PGP verification routine for tags could be accessed by other commands that require it. We do this by moving it to the common tag.c code. We rename the verify_tag() function to gpg_verify_tag() to avoid conflicts with the mktag.c function. Signed-off-by: Santiago Torres

[PATCH v4 4/6] tag.c: Replace varialbe name for readability

2016-04-04 Thread santiago
From: Santiago Torres The run_gpg_verify function has two variables size, and len. This may come off as confusing when reading the code. We clarify which one pertains to the length of the tag headers by renaming len to payload_length. Signed-off-by: Santiago Torres --- Note: this used

[PATCH v4 6/6] tag.c: Change gpg_verify_tag argument to sha1

2016-04-04 Thread santiago
From: Santiago Torres The gpg_verify_tag function resolves the ref for any existing object. However, git tag -v resolves to only tag-refs. We can provide support for sha1 by moving the refname resolution code out of gpg_verify_tag and allow for the object's sha1 as an argument. Signed-o

[PATCH v4 0/6] tag: move PGP verification code to tag.c

2016-04-04 Thread santiago
unction is just a thin wrapper around the verify-tag command. We can avoid one fork call by doing the verification inside the tag builtin instead. This applies on v2.8.0. Thanks! -Santiago [1] http://git.661346.n2.nabble.com/PATCH-RFC-builtin-tag-c-move-PGP-verification-inside-builtin-td76

[PATCH v4 5/6] tag: use pgp_verify_function in tag -v call

2016-04-04 Thread santiago
From: Santiago Torres Instead of running the verify-tag plumbing command, we use the pgp_verify_tag(). This avoids the usage of an extra fork call. To do this, we extend the number of parameters that tag.c takes, and verify-tag passes. Redundant calls done in the pgp_verify_tag function are

[PATCH v4 2/6] t/t7030-verify-tag.sh: Adds validation for multiple tags

2016-04-04 Thread santiago
From: Santiago Torres The verify-tag command supports mutliple tag names as an argument. However, no previous tests try to verify multiple tags at once. This test runs the verify-tag command against three tags separately and then compares the result against the invocation with the same three

[PATCH v4 1/6] builtin/verify-tag.c: Ignore SIGPIPE on gpg-interface

2016-04-04 Thread santiago
From: Santiago Torres The verify_signed_buffer comand might cause a SIGPIPE signal when the gpg child process terminates early (due to a bad keyid, for example) and git tries to write to it afterwards. Previously, ignoring SIGPIPE was done on the builtin/verify-tag.c command to avoid this issue

[PATCH v5 6/6] tag: use gpg_verify_function in tag -v call

2016-04-05 Thread santiago
From: Santiago Torres Instead of running the verify-tag plumbing command, we use the gpg_verify_tag() function within the verify_tag function to avoid doing an additional fork call. Signed-off-by: Santiago Torres --- builtin/tag.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions

[PATCH v5 3/6] builtin/verify-tag: change variable name for readability

2016-04-05 Thread santiago
From: Santiago Torres The run_gpg_verify function has two variables size, and len. This may come off as confusing when reading the code. We clarify which one pertains to the length of the tag headers by renaming len to payload_length. Signed-off-by: Santiago Torres --- builtin/verify-tag.c

[PATCH v5 4/6] builtin/verify-tag: replace name argument with sha1

2016-04-05 Thread santiago
From: Santiago Torres This change is meant to prepare verify_tag for libification. Many existing modules/commands already do the refname to sha1 resolution, so should avoid resolving the refname twice. To avoid breaking builtin/verify-tag, we move the refname resolution outside of the verify_tag

[PATCH v5 1/6] builtin/verify-tag.c: Ignore SIGPIPE on gpg-interface

2016-04-05 Thread santiago
From: Santiago Torres The verify_signed_buffer comand might cause a SIGPIPE signal when the gpg child process terminates early (due to a bad keyid, for example) and git tries to write to it afterwards. Previously, ignoring SIGPIPE was done on the builtin/verify-tag.c command to avoid this issue

[PATCH v5 2/6] t7030-verify-tag: Adds validation for multiple tags

2016-04-05 Thread santiago
From: Santiago Torres The verify-tag command supports multiple tag names as an argument. However, existing tests only test for invocation with a single tag, so we add a test invoking with multiple tags. Helped-by: Jeff King Signed-off-by: Santiago Torres --- t/t7030-verify-tag.sh | 12

[PATCH v5 5/6] builtin/verify-tag: move verification code to tag.c

2016-04-05 Thread santiago
From: Santiago Torres The PGP verification routine for tags could be accessed by other commands that require it. We do this by moving it to the common tag.c module. We rename the verify_tag() function to gpg_verify_tag() to avoid conflicts with the mktag.c function. Signed-off-by: Santiago

[PATCH v5 0/6] tag: move PGP verification code to tag.c

2016-04-05 Thread santiago
From: Santiago Torres v5 (this): Added helpful feedback by Eric * Reordering of the patches, to avoid temporal inclusion of a regression * Fix typos here and there. * Review commit messages, as some weren't representative of what the patches were doing anymore. * Updated t70

[PATCH v6 0/6] Move PGP verification out of verify-tag

2016-04-17 Thread santiago
From: Santiago Torres This is a follow up of [1], [2], [3], [4], and [5]. patches 1/6, 2/6 and 3/6 are the same as the corresponding commits in pu. v6: * As Junio suggested, updated 4/6, to include the name argument and the ternary operator to provide more descriptive error messages. I

[PATCH v6 1/6] builtin/verify-tag.c: ignore SIGPIPE in gpg-interface

2016-04-17 Thread santiago
From: Santiago Torres The verify_signed_buffer() function may trigger a SIGPIPE when the GPG child process terminates early (due to a bad keyid, for example) and Git tries to write to it afterwards. Previously, ignoring SIGPIPE was done in builtin/verify-tag.c to avoid this issue. However, any

[PATCH v6 3/6] verify-tag: change variable name for readability

2016-04-17 Thread santiago
From: Santiago Torres The run_gpg_verify() function has two variables, size and len. This may come off as confusing when reading the code. Clarify which one pertains to the length of the tag headers by renaming len to payload_length. Signed-off-by: Santiago Torres Reviewed-by: Eric Sunshine

[PATCH v6 5/6] verify-tag: move verification code to tag.c

2016-04-17 Thread santiago
From: Santiago Torres The PGP verification routine for tags could be accessed by other modules that require to do so. Publish the verify_tag function in tag.c and rename it to gpg_verify_tag so it does not conflict with builtin/mktag's static function. Helped-by: Junio C Hamano Signed-o

[PATCH v6 2/6] t7030: test verifying multiple tags

2016-04-17 Thread santiago
From: Santiago Torres The verify-tag command supports multiple tag names to verify, but existing tests only test for invocation with a single tag. Add a test invoking it with multiple tags. Helped-by: Jeff King Signed-off-by: Santiago Torres Reviewed-by: Eric Sunshine Signed-off-by: Junio C

[PATCH v6 4/6] verify-tag: add sha1 argument to verify_tag()

2016-04-17 Thread santiago
From: Santiago Torres The current interface of verify_tag() resolves reference names to SHA1, which might be redundant as future callers may resolve the refname to SHA1 beforehand. Add a SHA1 parameter to use instead of the name parameter. We also replace the name argument to report_name and

[PATCH v6 6/6] tag -v: verfy directly rather than exec-ing verify-tag

2016-04-17 Thread santiago
From: Santiago Torres tag -v forks into verify-tag, which only calls gpg_verify_tag(). Instead of forking to verify-tag, call gpg_verify_tag directly(). Helped-by: Eric Sunshine Signed-off-by: Santiago Torres --- builtin/tag.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions

[PATCH v7 0/6] Move PGP verification out of verify-tag

2016-04-19 Thread santiago
From: Santiago Torres This is a follow up of [1], [2], [3], [4], [5], [6]. patches 1/6, 2/6, are the same as the corresponding commits in pu. v7: Mostly style/clarity changes mostly. Thanks Peff, Eric and Junio for the feedback! In summary: * Eric pointed out issues with 3/6's c

[PATCH v7 2/6] t7030: test verifying multiple tags

2016-04-19 Thread santiago
From: Santiago Torres The verify-tag command supports multiple tag names to verify, but existing tests only test for invocation with a single tag. Add a test invoking it with multiple tags. Helped-by: Jeff King Signed-off-by: Santiago Torres Reviewed-by: Eric Sunshine Signed-off-by: Junio C

[PATCH v7 1/6] builtin/verify-tag.c: ignore SIGPIPE in gpg-interface

2016-04-19 Thread santiago
From: Santiago Torres The verify_signed_buffer() function may trigger a SIGPIPE when the GPG child process terminates early (due to a bad keyid, for example) and Git tries to write to it afterwards. Previously, ignoring SIGPIPE was done in builtin/verify-tag.c to avoid this issue. However, any

[PATCH v7 4/6] verify-tag: prepare verify_tag for libification

2016-04-19 Thread santiago
From: Santiago Torres The current interface of verify_tag() resolves reference names to SHA1, however, the plan is to make this functionality public and the current interface is cumbersome for callers: they are expected to supply the textual representation of a sha1/refname. In many cases, this

[PATCH v7 5/6] verify-tag: move tag verification code to tag.c

2016-04-19 Thread santiago
From: Santiago Torres The PGP verification routine for tags could be accessed by other modules that require to do so. Publish the verify_tag function in tag.c and rename it to gpg_verify_tag so it does not conflict with builtin/mktag's static function. Helped-by: Junio C Hamano Signed-o

[PATCH v7 6/6] tag -v: verfy directly rather than exec-ing verify-tag

2016-04-19 Thread santiago
From: Santiago Torres Instead of having tag -v fork to run verify-tag, use the gpg_verify_tag() function directly. Helped-by: Eric Sunshine Signed-off-by: Santiago Torres --- builtin/tag.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/builtin/tag.c b/builtin

[PATCH v7 3/6] verify-tag: update variable name and type

2016-04-19 Thread santiago
From: Santiago Torres The run_gpg_verify() function has two variables, size and len. This may come off as confusing when reading the code. Clarify which one pertains to the length of the tag headers by renaming len to payload_size. Additionally, change the type of payload_size to size_t to

[PATCH v8 2/6] t7030: test verifying multiple tags

2016-04-22 Thread santiago
From: Santiago Torres The verify-tag command supports multiple tag names to verify, but existing tests only test for invocation with a single tag. Add a test invoking it with multiple tags. Helped-by: Jeff King Signed-off-by: Santiago Torres Reviewed-by: Eric Sunshine Signed-off-by: Junio C

[PATCH v8 4/6] verify-tag: prepare verify_tag for libification

2016-04-22 Thread santiago
From: Santiago Torres The current interface of verify_tag() resolves reference names to SHA1, however, the plan is to make this functionality public and the current interface is cumbersome for callers: they are expected to supply the textual representation of a sha1/refname. In many cases, this

[PATCH v8 3/6] verify-tag: update variable name and type

2016-04-22 Thread santiago
From: Santiago Torres The run_gpg_verify() function has two variables, size and len. This may come off as confusing when reading the code. Clarify which one pertains to the length of the tag headers by renaming len to payload_size. Additionally, change the type of payload_size to size_t to

[PATCH v8 0/6] Move PGP verification out of verify-tag

2016-04-22 Thread santiago
From: Santiago Torres This is a follow up of [1], [2], [3], [4], [5], [6], and [7]. patches 1/6, 2/6, and 3/6, are the same as the corresponding commits in pu. v8: Minor nits, I decided to quickly reroll to drop the extern qualifier in tag.c: * Eric pointed out that we could block-scope

[PATCH v8 6/6] tag -v: verify directly rather than exec-ing verify-tag

2016-04-22 Thread santiago
From: Santiago Torres Instead of having tag -v fork to run verify-tag, use the gpg_verify_tag() function directly. Helped-by: Eric Sunshine Signed-off-by: Santiago Torres --- builtin/tag.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/builtin/tag.c b/builtin

[PATCH v8 5/6] verify-tag: move tag verification code to tag.c

2016-04-22 Thread santiago
From: Santiago Torres The PGP verification routine for tags could be accessed by other modules that require to do so. Publish the verify_tag function in tag.c and rename it to gpg_verify_tag so it does not conflict with builtin/mktag's static function. Helped-by: Junio C Hamano Signed-o

[PATCH v8 1/6] builtin/verify-tag.c: ignore SIGPIPE in gpg-interface

2016-04-22 Thread santiago
From: Santiago Torres The verify_signed_buffer() function may trigger a SIGPIPE when the GPG child process terminates early (due to a bad keyid, for example) and Git tries to write to it afterwards. Previously, ignoring SIGPIPE was done in builtin/verify-tag.c to avoid this issue. However, any

[RFC PATCH] builtin:tag:verify_tag: allow gpg output + pretty

2019-04-12 Thread santiago
From: Santiago Torres On the git tag -v code, there is a guard to suppress gpg output if a pretty format is provided. The rationale for this is that the gpg output *and* the pretty formats together may conflict with each other. However, both outputs are directed to different output streams and

[PATCH 0/2] tag verification: do not mute gpg output

2019-04-27 Thread santiago
From: Santiago Torres The default behavior of the tag verification functions used to quiet down the gpg output if --format was passed. The rationale for this was to avoid --format to be litterred by the gpg output. However, this may be unnecessary because the gpg output is already streamed to

[PATCH 1/2] builtin/tag: do not omit -v gpg out for --format

2019-04-27 Thread santiago
From: Santiago Torres The current implementation of git tag -v omits the gpg output when the --format flag is passed. This may not be useful to users that want to see the gpg output *and* --format the output of the git tag -v. Instead, pass the default gpg interface output if --format is

[PATCH 2/2] builtin/verify-tag: do not omit gpg on --format

2019-04-27 Thread santiago
From: Santiago Torres The current implementation of git-verify-tag omits the gpg output when the --format flag is passed. This may not be useful to users that want to see the gpg output *and* --format the output of git verify-tag. Instead, respect the --raw flag or the default gpg output

[RFC PATCH] t: lib-gpg: flush agent sockets on startup

2017-07-07 Thread santiago
From: Santiago Torres When running gpg-relevant tests, a gpg-daemon is ran for a trash_directory-specific GNUPGHOME. This daemon creates a unix socket on the target host, and it will be used on subsequent runs of the same test script. Add a call to kill the agent and flush the sockets of the

[PATCH] t: lib-gpg: flush gpg agent on startup

2017-07-20 Thread santiago
From: Santiago Torres When running gpg-relevant tests, a gpg-daemon is spawned for each GNUPGHOME used. This daemon may stay running after the test and cache file descriptors for the trash directories, even after the trash directory is removed. This leads to ENOENT errors when attempting to

[PATCH v2] t: lib-gpg: flush gpg agent on startup

2017-07-20 Thread santiago
From: Santiago Torres When running gpg-relevant tests, a gpg-daemon is spawned for each GNUPGHOME used. This daemon may stay running after the test and cache file descriptors for the trash directories, even after the trash directory is removed. This leads to ENOENT errors when attempting to

Re: Commits are no longer gpg-signed in 2.9.0 when "commit.gpgsign" is enabled

2016-07-11 Thread Santiago Torres
Hi Nils, I just checked and I have commits made in 2.9 with this option set and I don't seem to have your issue. Here's what I did: santiago at ~/test-signing ✔ git init Initialized empty Git repository in /home/santiago/test-signing/.git/ santiago at ~/test-signing ✔

Re: Commits are no longer gpg-signed in 2.9.0 when "commit.gpgsign" is enabled

2016-07-11 Thread Santiago Torres
On Mon, Jul 11, 2016 at 06:27:57PM +0200, Nils Fenner wrote: > Hi Santiago, > > repeated your test here and actually found something interesting. When > committing via 'git gui', commits are not being gpg-signed, while firing > a 'git commit' shows the pas

[OT] USENIX paper on Git

2016-08-03 Thread Santiago Torres
hope to continue working on Git in general once I have more time for it. Thanks again for all the patience reviewing patches and discussing everything. Thanks! -Santiago. P.S. Let me know if anyone is going to USENIX. I'm looking forward to meeting! [1] http://thread.gmane.org/gmane.comp.vers

Re: [OT] USENIX paper on Git

2016-08-03 Thread Santiago Torres
is the correct link? Oh my god, sorry, I meant to p, not to ctrl + v. My head is all over the place as of late. Here's the correct link: http://isis.poly.edu/~jcappos/papers/torres_toto_usenixsec-2016.pdf Thanks! -Santiago. -- To unsubscribe from this list: send the line "unsubscrib

Re: [OT] USENIX paper on Git

2016-08-03 Thread Santiago Torres
On Wed, Aug 03, 2016 at 10:14:21AM -0700, Stefan Beller wrote: > On Wed, Aug 3, 2016 at 8:25 AM, Santiago Torres wrote: > > > share things before they are published. Thankfully, this is OK in > >> > USENIX's book. Here's the link: > >> > http://i2.

Re: [OT] USENIX paper on Git

2016-08-03 Thread Santiago Torres
the call of whether something is fishy. I don't think this is necessarily bad. > > I think your solution also had some mechanisms for adding trusted keys > as part of the hash chain. I'm not convinced that's something that > should be part of git's solution in part

Re: [OT] USENIX paper on Git

2016-08-03 Thread Santiago Torres
On Wed, Aug 03, 2016 at 10:35:54AM -0700, Junio C Hamano wrote: > Santiago Torres writes: > > >> Submodules actually track commits, not tags or branches. > >> > >> This is confusing for some users, e.g. the user intended to track a > >> library at v

  1   2   3   >