Thread (28 messages) 28 messages, 10 authors, 2021-12-06

ab/run-command + em/missing-pager (was: What's cooking in git.git (Nov 2021, #07; Mon, 29))

flat view

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-11-30 21:07:55

On Mon, Nov 29 2021, Junio C Hamano wrote:
* ab/run-command (2021-11-25) 9 commits
 - run-command API: remove "env" member, always use "env_array"
 - difftool: use "env_array" to simplify memory management
 - run-command API: remove "argv" member, always use "args"
 - run-command API users: use strvec_push(), not argv construction
 - run-command API users: use strvec_pushl(), not argv construction
 - run-command tests: use strvec_pushv(), not argv assignment
 - run-command API users: use strvec_pushv(), not argv assignment
 - upload-archive: use regular "struct child_process" pattern
 - worktree: stop being overly intimate with run_command() internals
I think the only outstanding thing for this topic is Eric's [1] comment
(on his own code). I think that variable shadowing is OK.

1/2 of that patch will also be rewritten in the in-flight hook topic
(but the "reset --hard" shadowing is left in place).
* em/missing-pager (2021-11-24) 1 commit
- pager: fix crash when pager program doesn't exist
As noted in [2] I'm happy to get this more isolated fix first. I'd
missed that there was a re-submission[3] until now (since In-Reply-To
wasn't maintained).

The code change in [3] isn't needed anymore when combined with my
ab/run-command.

Depending on how you're planning to advance these perhaps you'd like to
revert that as it's merged with ab/run-command, or I can re-roll
ab/run-command on top of it if you'd like.

We could also just leave that now-redundant child_process_init() in
pager.c, but having something that'll amount to cargo-culting to get
around a bug in dead code doesn't seem ideal. It would be nice to have
the API use reflect "argv" and "env" being gone.

1. https://lore.kernel.org/git/CAPig+cRi6SeuV7k_+9JCcnf79daLZp5B=EyHK-KxC1VGN0B4ig@mail.gmail.com/ (local)
2. https://lore.kernel.org/git/211124.865ysie2br.gmgdl@evledraar.gmail.com/ (local)
3. https://lore.kernel.org/git/20211125000239.2336-1-ematsumiya@suse.de (local)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help