Tao Qingyun 8d2008196b builtin/branch.c: remove useless branch_get
branch_get sometimes returns current_branch, which can be NULL (e.g., if
you're on a detached HEAD). Try:

  $ git branch HEAD
  fatal: no such branch 'HEAD'

  $ git branch ''
  fatal: no such branch ''

However, it seems weird that we'd check those cases here (and provide
such lousy messages). And indeed, dropping that and letting us
eventually hit create_branch() gives a much better message:

  $ git branch HEAD
  fatal: 'HEAD' is not a valid branch name.

  $ git branch ''
  fatal: '' is not a valid branch name.

Signed-off-by: Tao Qingyun <taoqy@ls-a.me>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-18 10:57:31 +09:00
..
2018-08-20 11:33:53 -07:00
2018-08-13 14:14:43 -07:00
2018-08-20 11:33:53 -07:00
2018-08-20 11:33:53 -07:00
2018-08-27 14:33:43 -07:00
2018-08-20 11:33:53 -07:00
2018-05-13 10:45:05 +09:00
2018-08-20 11:33:53 -07:00
2018-08-15 15:08:23 -07:00
2018-08-17 13:09:56 -07:00
2018-08-15 15:08:23 -07:00
2018-05-08 15:59:16 +09:00
2018-08-15 15:08:23 -07:00
2018-08-15 15:08:23 -07:00
2018-08-20 11:33:53 -07:00
2018-06-01 15:06:37 +09:00
2018-08-15 15:08:23 -07:00
2018-05-23 14:38:15 +09:00
2018-08-15 15:08:23 -07:00
2018-05-30 14:04:05 +09:00
2018-07-18 12:20:28 -07:00
2018-08-27 14:33:43 -07:00
2018-08-27 14:33:43 -07:00
2018-07-18 12:20:28 -07:00
2018-08-27 14:33:43 -07:00
2018-08-15 15:08:23 -07:00
2018-08-20 11:33:53 -07:00
2018-08-27 14:33:43 -07:00
2018-03-15 12:01:08 -07:00
2018-08-17 13:09:56 -07:00
2018-05-29 00:28:22 +09:00
2018-09-27 11:50:45 -07:00
2018-07-18 12:20:28 -07:00
2018-08-20 11:33:53 -07:00
2018-08-17 15:18:01 -07:00