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

[PATCH v2 0/3] branch: error description when deleting a not fully merged branch

From
Rubén Justo <rjusto@gmail.com>
Date
Jan 11, 2024, 12:20 UTC
Message-ID
<4aedc15c-4b3f-4f5e-abea-581b501600f8@gmail.com>
In-Reply-To
<04c3556f-0242-4ac3-b94a-be824cd2004a@gmail.com>

The error message we show when the user tries to delete a not fully merged branch describes the error and gives a hint to the user:

	error: the branch 'foo' is not fully merged.
	If you are sure you want to delete it, run 'git branch -D foo'.

Let's move the hint part so that it is displayed using the advice machinery:

	error: the branch 'foo' is not fully merged
	hint: If you are sure you want to delete it, run 'git branch -D foo'
	hint: Disable this message with "git config advice.forceDeleteBranch false"
Rubén Justo (3):
  advice: sort the advice related lists
  advice: fix an unexpected leading space
  branch: make the advice to force-deleting a conditional one
 Documentation/config/advice.txt | 157 ++++++++++++++++----------------
 advice.c                        |  14 ++-
 advice.h                        |  15 +--
 builtin/branch.c                |   8 +-
 4 files changed, 99 insertions(+), 95 deletions(-)
-- 
2.42.0
Previous: Rubén JustoNext: Rubén Justo
Message 5 of 12 in “branch: error description when deleting a not fully merged branch”
  1. branch: error description when deleting a not fully merged branchRubén Justo, Jan 10, 2024
  2. Junio C HamanoJan 10, 2024
  3. Junio C HamanoJan 10, 2024
  4. Rubén JustoJan 11, 2024
  5. 0/3 branch: error description when deleting a not fully merged branchRubén Justo, Jan 11, 2024
  6. 1/3 advice: sort the advice related listsRubén Justo, Jan 11, 2024
  7. 2/3 advice: fix an unexpected leading spaceRubén Justo, Jan 11, 2024
  8. Junio C HamanoJan 12, 2024
  9. Rubén JustoJan 12, 2024
  10. Junio C HamanoJan 12, 2024
  11. Junio C HamanoJan 12, 2024
  12. 3/3 branch: make the advice to force-deleting a conditional oneRubén Justo, Jan 11, 2024

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.