Re: [PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-09-01 Thread Jakub Narębski
Hello Johannes, W dniu 01.09.2016 o 15:33, Johannes Schindelin pisze: > On Wed, 31 Aug 2016, Jakub Narębski wrote: >> W dniu 29.08.2016 o 10:06, Johannes Schindelin pisze: >>> @@ -471,17 +487,20 @@ int sequencer_commit(const char *defmsg, struct >>> replay_opts *opts, >>> >>> if (IS_REBASE

Re: [PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-09-01 Thread Johannes Schindelin
Hi Junio, On Wed, 31 Aug 2016, Junio C Hamano wrote: > Jakub Narębski writes: > > >> + else { > >> + opts->gpg_sign = buf.buf + 2; > >> + strbuf_detach(&buf, NULL); > > > > Wouldn't we leak 2 characters that got skipped? Maybe

Re: [PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-09-01 Thread Johannes Schindelin
Hi Kuba, On Wed, 31 Aug 2016, Jakub Narębski wrote: > W dniu 29.08.2016 o 10:06, Johannes Schindelin pisze: > > > The rebase command sports a `--gpg-sign` option that is heeded by the > > interactive rebase. > > Should it be "sports" or "supports"? Funny. I got a PR last week that wanted to fi

Re: [PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-09-01 Thread Johannes Schindelin
Hi Kuba, On Wed, 31 Aug 2016, Jakub Narębski wrote: > Note that if the last line was > > + sequencer_entrust(opts, strbuf_detach(&buf, > NULL)); > > we can make it not leak. A bit tricksy, though. Heh... I made it that tricksy, then. Ciao, Dscho

Re: [PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-08-31 Thread Junio C Hamano
Jakub Narębski writes: > Though xstrdup(buf.buf + 2) followed by strbuf_release(&buf) would > make free(opts->gpg_sign) possible without crash. That is we can > work without *_entrust() mechanism at the cost of strdups. Absolutely. It is not like entrust() thing is free of allocation cost (it

Re: [PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-08-31 Thread Jakub Narębski
W dniu 31.08.2016 o 22:12, Junio C Hamano pisze: > Jakub Narębski writes: >> Johannes Schindelin wrote: >>> + else { >>> + opts->gpg_sign = buf.buf + 2; >>> + strbuf_detach(&buf, NULL); >> >> Wouldn't we leak 2 characters that

Re: [PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-08-31 Thread Junio C Hamano
Jakub Narębski writes: >> +else { >> +opts->gpg_sign = buf.buf + 2; >> +strbuf_detach(&buf, NULL); > > Wouldn't we leak 2 characters that got skipped? Maybe xstrdup would > be better (if it is leaked, and not reattached)

Re: [PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-08-31 Thread Jakub Narębski
Hello Johannes, W dniu 29.08.2016 o 10:06, Johannes Schindelin pisze: > The rebase command sports a `--gpg-sign` option that is heeded by the > interactive rebase. Should it be "sports" or "supports"? > > This patch teaches the sequencer that trick, as part of the bigger > effort to make the s

[PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

2016-08-29 Thread Johannes Schindelin
The rebase command sports a `--gpg-sign` option that is heeded by the interactive rebase. This patch teaches the sequencer that trick, as part of the bigger effort to make the sequencer the work horse of the interactive rebase. Signed-off-by: Johannes Schindelin --- sequencer.c | 48 +++