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

Re: git branch --editdescription fatal error

From
Stefan Beller <sbeller@google.com>
Date
Jan 6, 2017, 17:55 UTC
Message-ID
<CAGZ79kaz_hS9P7vqV9EhZazM_g0OUdRfMtFPJ7gFu-h-ku=NKw@mail.gmail.com>
In-Reply-To
<MWHPR19MB11357994E6C43DBCC0931CD7BC630@MWHPR19MB1135.namprd19.prod.outlook.com>
On Fri, Jan 6, 2017 at 9:25 AM, Jake Lambert <jake@onahill.co> wrote:
> Hello,
>
> When executing "git branch <branch> --edit-description" on a branch with no description set, I get "fatal: could not unset 'branch.<branch>.description". It would seem that the unsetting piece should occur only after checking if it was set in the first place.

That seems strange. Is it possible that your config is not writable? (.git/config, ~/gitconfig, you'd need to find out where the <branch> is configured already via git config --global/--system/--local --list)

> I am not too familiar with the inner workings of git, but if you accept pull requests, I'm happy to give it a shot if you can give me directions as to how to submit one to you.

We rather do email based workflow, see https://github.com/git/git/blob/master/Documentation/SubmittingPatches (We use github only as a host, you could also obtain it from one of https://git-blame.blogspot.com/p/git-public-repositories.html)

>
> While I have you, I would also like to make a feature request for branch descriptions to (optionally) be included in the output of git branch <noargs> (or something like git branch --descriptions). This is particularly helpful where branch names match JIRA tickets numbers or are simply so old I don't remember what they are but don't want to delete them just in case.

Apparently the branch descriptions are only used for the request-pull subcommand, https://github.com/git/git/commit/c0168147831fce00975949213eef3471b7a2b76b and the merge message https://github.com/git/git/commit/898eacd8ada2d012f977948350ed60845e238037

If you want to work on both of these issues, have a look at edit_branch_description as well as print_ref_list in builtin/branch.c

> Thank you for maintaining this absolutely wonderful program, and have a happy New Year!

Happy new year! Stefan

Previous: Jake LambertNext: Ralf Thielow
Message 2 of 6 in “git branch --editdescription fatal error”
  1. Jake LambertJan 6, 2017
  2. Stefan BellerJan 6, 2017
  3. Ralf ThielowJan 6, 2017
  4. Stefan BellerJan 6, 2017
  5. Ralf ThielowJan 6, 2017
  6. Jeff KingJan 6, 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.