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

Why does git-mergetool use /dev/tty?

From
Brian Gernhardt <brian@gernhardtsoftware.com>
Date
Aug 24, 2010, 01:49 UTC
Message-ID
<3D6C7B12-FA06-4EAD-9781-5CA74FE23057@gernhardtsoftware.com>
git-mergetool.sh, lines 298-302:
Show 5 quoted lines
>     if test $last_status -ne 0; then
>         prompt_after_failed_merge < /dev/tty || exit 1
>     fi
>     printf "\n"
>     merge_file "$i" < /dev/tty > /dev/tty
Why does git-mergetool ignore the provided STDIN and STDOUT when not given a path to merge?
This wasn't apparent until bb0a484: "mergetool: Skip autoresolved paths" added a test that doesn't provide a file to merge on the command line.
~~ Brian Gernhardt
Next: Jonathan Nieder
Message 1 of 5 in “Why does git-mergetool use /dev/tty?”
  1. Brian GernhardtAug 24, 2010
  2. Jonathan NiederAug 24, 2010
  3. Brian GernhardtAug 24, 2010
  4. Charles BaileyAug 24, 2010
  5. Brian GernhardtAug 24, 2010

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.