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

How to detect if a tree is in status "merge"?

From
Olaf Hering <olaf@aepfle.de>
Date
Dec 8, 2019, 10:55 UTC
Message-ID
<20191208115517.6b319a44.olaf@aepfle.de>
Is there a way to detect (from a script) if the current working tree is in state 'merge'?
Right now I had the case that a conflict resolution resulted in 'no pending changes'. As a result my "git --no-pager status --porcelain --untracked-files=no | tee $t" showed nothing, which skipped the required 'git commit' in my script.

Thanks, Olaf

Next: Junio C Hamano
Message 1 of 3 in “How to detect if a tree is in status "merge"?”
  1. Olaf HeringDec 8, 2019
  2. Junio C HamanoDec 9, 2019
  3. Olaf HeringDec 10, 2019

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.