Re: [PATCH] Introduce --current option to git-branch builtin command.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vincent van Ravesteijn <vfr@xxxxxxx> writes:

> git-branch has four modes: 'list', 'create', 'delete', and
> rename'. Isn't --current then just another option to the 'list'-mode?

That is how I would look at it.  We can think of various ways that
"list" can be filtered, and matching by name is one that we have an
implementation for.  "Current-only" could be another one.

> If '--current' implies the 'list'-mode, it would use
> print_ref_list'. There already is code in print_ref_list to detect
> whether a branch is the current one, it outputs the branch list in a
> formatted way, it takes care of 'columns', so wouldn't it be better to
> modify that code to only print the current branch ?

Exactly.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]