#1641·git-bug

`bug new`: confusing interaction between `-t title` and `-F filename`

Author: rmunnCreated Sep 29, 2026Updated Sep 29, 2026

While experimenting with git-bug, I tried git bug bug new -t 'Title for the bug' -F bug-message.txt, where bug-message.txt was a file containing "This is the description of the bug."

What I expected was a bug that looked like this:

Title for the bug

This is the description of the bug.

What I got was:

This is the description of the bug.

I.e., the -F argument had assumed the message file contained a title on the first line, and had overridden (and discarded) the text I had passed to -t.

This may be intended behavior; if it is, then the wording of bug new --help should probably be adjusted. When I saw this:

  -t, --title string      Provide a title to describe the issue
  -m, --message string    Provide a message to describe the issue
  -F, --file string       Take the message from the given file. Use - to read the message from the standard input

I saw the word "message" in the -F description and thought "Ah ha, so the file contents will be the body of the bug report, and I need to provide the -t option as well if I want it to have a one-line title". That is not how it turned out to work.

I don't know what the right behavior should be if both -t and -F are specified (or even if -m and -F are specified). Perhaps -F should override -t, perhaps -t should override -F. (I lean towards the latter but if majority opinion is towards "-F should win" then that's how it should be implemented). But at least there should be a warning printed to stderr if one of the command-line options is being overridden by a different one.