[PATCH v5] commit-tree: utilize parse-options api

2019-03-07 Thread Brandon Richardson
: Brandon Richardson --- Notes: GitHub Pull Request: https://github.com/brandon1024/git/pull/5 Travis CI Build: https://travis-ci.com/brandon1024/git/builds/103551319 Documentation/git-commit-tree.txt | 9 +- builtin/commit-tree.c | 158 -- parse

Re: [PATCH v4] commit-tree: utilize parse-options api

2019-03-06 Thread Brandon Richardson
On Wed, Mar 6, 2019 at 7:21 PM Junio C Hamano wrote: > > > > +When mixing `-m` and `-F` options, the commit log message will be > > +composed in the order in which the options are given. > > It may be just me, but this new paragraph made me think that we can > give at most one -m and one -F option

[PATCH v4] commit-tree: utilize parse-options api

2019-03-05 Thread Brandon Richardson
: Brandon Richardson --- Notes: GitHub Pull Request: https://github.com/brandon1024/git/pull/4 Travis CI Build: https://travis-ci.com/brandon1024/git/builds/103055317 Documentation/git-commit-tree.txt | 8 +- builtin/commit-tree.c | 158 -- parse

Re: [PATCH v3] commit-tree: utilize parse-options api

2019-03-04 Thread Brandon Richardson
On Mon, Mar 4, 2019 at 7:18 AM Duy Nguyen wrote: > You probably should mention about the extra _() too (e.g. "while at > there, mark more strings for translation") just to be clear it's > intentional. Good call. Will update. > > +#include "parse-options.h" > > +#include "string-list.h" > > Every

[PATCH v3] commit-tree: utilize parse-options api

2019-03-03 Thread Brandon Richardson
prevent mistakes like this in the future. Hence this change. Signed-off-by: Brandon Richardson --- Notes: GitHub Pull Request: https://github.com/brandon1024/git/pull/3 Travis CI Build: https://travis-ci.com/brandon1024/git/builds/102953064 Documentation/git-commit-tree.txt | 8

Re: [PATCH v2] commit-tree: utilize parse-options api

2019-03-01 Thread Brandon Richardson
Hi Eric, On Fri, Mar 1, 2019 at 3:53 PM Eric Sunshine wrote: > Note, in particular how Peff used !(arg) rather than (!arg) in your > patch. This distinction is subtle but important enough to warrant > being called out. The reason that Peff did it this way (the _correct_ > way) is that, as a macro

Re: [PATCH v2] commit-tree: utilize parse-options api

2019-03-01 Thread Brandon Richardson
On Fri, Mar 1, 2019 at 2:09 PM Jeff King wrote: > I think you want an "OR". Or even separate conditions, since really this > is just implying OPT_NEG(). In fact, you could implement and explain it > like this: > > diff --git a/parse-options.h b/parse-options.h > index 14fe32428e..d46f89305c 100644

[PATCH v2] commit-tree: utilize parse-options api

2019-03-01 Thread Brandon Richardson
prevent mistakes like this in the future. Hence this change. Signed-off-by: Brandon Richardson --- Notes: GitHub Pull Request: https://github.com/brandon1024/git/pull/2 Travis CI Results: https://travis-ci.com/brandon1024/git/builds/102755598 Documentation/git-commit-tree.txt | 8

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-27 Thread Brandon Richardson
Hi Jeff, > One of the reasons I did not bother with that condition when I added the > OPT_NEG() and OPT_ARG() variants is that you can only get an unexpected > NULL argument if you explicitly give the NOARG or OPTARG flags. So it's > very easy to _forget_ to give such a flag, because you simply ar

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-27 Thread Brandon Richardson
Thank you all for the helpful comments :-) On Wed, 27 Feb 2019 at 07:08, Duy Nguyen wrote: > > It was discovered that the --no-gpg-sign option was documented > > but not implemented in 55ca3f99, and the existing implementation > > Most people refer to a commit with this format > > 55ca3f99ae (com

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-26 Thread Brandon Richardson
Hi Andrei, > > would attempt to translate the option as a tree oid.It was also > > Missing space after period. Oops, thanks for pointing that out. > > > + { OPTION_CALLBACK, 'p', NULL, &parents, "parent", > > + N_("id of a parent commit object"), PARSE_OPT_NONEG, > > Co

Re: Am a newby and I cannot compile git!!!!

2019-02-11 Thread Brandon Richardson
Welcome to the community! Here are some documents that can help you get started: - INSTALL - Documentation/CodingGuidelines - Documentation/howto/maintain-git.txt - t/README - Documentation/SubmittingPatches On Sun, 10 Feb 2019 at 17:52, Fabio Aiuto wrote: > > Hallo to the whole git community, >

Re: [PATCH v2 [rebased]] [Enhancement] Improve internals / refactoring.

2019-02-01 Thread Brandon Richardson
Hi Shahzad, On Fri, 1 Feb 2019 at 19:54, Shahzad Lone wrote: > git_zstream stream; > - unsigned char ibuf[1024 * 16]; > - unsigned char obuf[1024 * 16]; > + unsigned char ibuf[16384]; > + unsigned char obuf[16384]; > unsigned long olen = 0; This change als

git@vger.kernel.org

2019-01-19 Thread Brandon Richardson
deled after this one. Fix a 9/10 copy/paste error while at it. Signed-off-by: Martin Ågren Signed-off-by: Brandon Richardson --- t/t7510-signed-commit.sh | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh index 86d3f

[PATCH v4 2/2] commit-tree: add missing --gpg-sign flag

2019-01-19 Thread Brandon Richardson
Add --gpg-sign option in commit-tree, which was documented, but not implemented, in 55ca3f99ae. Add tests for the --gpg-sign option. Signed-off-by: Brandon Richardson --- builtin/commit-tree.c| 8 +++- t/t7510-signed-commit.sh | 15 --- 2 files changed, 19 insertions(+), 4

Re: [PATCH v3] commit-tree: add missing --gpg-sign flag

2019-01-19 Thread Brandon Richardson
Hi Martin, On Sat, 19 Jan 2019 at 17:19, Martin Ågren wrote: > > > Or, a bit simpler: > > > > > > oid=$(echo 10 | git commit-tree -S HEAD^{tree}) && > > > git tag tenth-signed "$oid" > > > > Just noticed your latest email. Do you prefer it this way? > > I think so, yeah. (But who knows what o

Re: [PATCH v3] commit-tree: add missing --gpg-sign flag

2019-01-19 Thread Brandon Richardson
Hi Martin, > I looked into this test in a bit more detail, and it seems to be quite > hard to get right. Part of the reason is that `git commit-tree` requires > a bit more careful use than `git commit`, but part of it is that the > tests that we already have for `git commit-tree [-S]` right before

[PATCH v3] commit-tree: add missing --gpg-sign flag

2019-01-18 Thread Brandon Richardson
Add --gpg-sign option in commit-tree, which was documented, but not implemented, in 55ca3f99ae. Add tests for the --gpg-sign option. Signed-off-by: Brandon Richardson --- Hi all, Third and (hopefully) final version. Thanks again Martin for the helpful comments. --- builtin/commit-tree.c

Re: [PATCH] commit-tree: add missing --gpg-sign flag

2019-01-18 Thread Brandon Richardson
Hi Martin, Thanks again for your comments and patience, I appreciate it :-) > > - if (skip_prefix(arg, "-S", &sign_commit)) > > + if(!strcmp(arg, "--gpg-sign")) { > > + skip_prefix(arg, "--gpg-sign", &sign_commit); > > I personally find this a bit con

[PATCH] commit-tree: add missing --gpg-sign flag

2019-01-17 Thread Brandon Richardson
Add --gpg-sign option in commit-tree, which was documented, but not implemented, in 55ca3f99ae. Signed-off-by: Brandon Richardson --- Thanks Martin for the tips and suggestions! builtin/commit-tree.c| 8 +++- t/t7510-signed-commit.sh | 4 +++- 2 files changed, 10 insertions(+), 2

[PATCH] Allow usage of --gpg-sign flag in commit-tree builtin.

2019-01-17 Thread Brandon Richardson
Signed-off-by: Brandon Richardson --- Hi, This is my first contribution, so please bear with me. All feedback is appreciated. Ran into this issue while writing a signed commit object manually. Here are the steps I followed to replicate the issue: mkdir test && cd test git init ec