git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Regression: Ctrl-c from the pager in an alias exits it

From
Trygve Aaberge <trygveaa@gmail.com>
Date
Jan 5, 2017, 14:25 UTC
Message-ID
<20170105142529.GA15009@aaberge.net>

I'm experiencing an issue when using aliases for commands that open the pager. When I press Ctrl-c from the pager, it exits. This does not happen when I don't use an alias and did not happen before. It causes problems because Ctrl-c is also used for other things, such as canceling a search that hasn't completed.

To reproduce, create e.g. the alias `l = log` and run `git l`. Then press Ctrl-c. The expected behavior is that nothing happens. The actual behavior is that the pager exits.

I bisected the repo, and found that the commit 86d26f240 [0] introduced the issue.

[0]: 86d26f240 (setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE
                when .. - 2015-12-20)
-- 
Trygve Aaberge
Next: Jeff King
Message 1 of 19 in “Regression: Ctrl-c from the pager in an alias exits it”
  1. Trygve AabergeJan 5, 2017
  2. Jeff KingJan 6, 2017
  3. Jeff KingJan 6, 2017
  4. Jeff KingJan 6, 2017
  5. Jeff KingJan 6, 2017
  6. Trygve AabergeJan 6, 2017
  7. Johannes SixtJan 6, 2017
  8. Jeff KingJan 6, 2017
  9. Johannes SixtJan 6, 2017
  10. Jeff KingJan 6, 2017
  11. 0/3 fix ^C killing pager when running aliasJeff King, Jan 7, 2017
  12. 1/3 execv_dashed_external: use child_process structJeff King, Jan 7, 2017
  13. 2/3 execv_dashed_external: stop exiting with negative codeJeff King, Jan 7, 2017
  14. 3/3 execv_dashed_external: wait for child on signal deathJeff King, Jan 7, 2017
  15. Johannes SixtJan 7, 2017
  16. Jeff KingJan 7, 2017
  17. Duy NguyenJan 7, 2017
  18. Jacob KellerJan 7, 2017
  19. Jacob KellerJan 7, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.