Re: [RFC/PATCH 0/2] RFC/POC: patterns for branch list

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

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:

> This mini series is about introducing patterns to the list mode of
> 'git branch' much like the pattern for 'git tag -l'.

I do find myself often typing

    git branch | grep mg/

so this would be a welcome addition, even though the above is not too ugly
nor cumbersome.

> '-l' is the natural short option name for '--list'. This is taken for the
> rarely used or needed 'create reflog' option. I'd change the latter to
> '-g,--create-reflog' (cmp. log) and take '-l,--list' but know the reaction
> already.

My reaction would be "As the eventual goal, it is the right thing to
do---if we were writing git from scratch today, we would probably have
done so. Present a reasonable migration plan.".  Perhaps like this?

 1. Introduce "--create-reflog", and deprecate "-l".  Make "branch -l"
    emit warning and advise to use "--create-reflog" instead, but still
    act as a synonym for "--create-reflog".

    Introduce "--list" but without any short option.

    Ship 1.7.6 with these changes.

 2. Introduce "-g" as synonym for "--create-reflog".  Make "branch -l" die
    and advise to use "-g" or "--create-reflog" instead.

    Ship 1.7.X series after 1.7.7 with these changes.

 3. In 1.8.0, make "-l" a synonym for "--list".

> '-v' and '-vv' both take considerable time (because they need to walk).
> It makes more sense to have '-v' display cheap output (upstream name)
> and '-vv' add expensive output (ahead/behind info). '-vvv' could add super
> expensive info (ahead/equivalent/behind a la cherry-mark).

Probably.  Would it be a solution to deprecate "git branch -v" and make
the behaviour of "git branch -l -v{1,3}" as you described?
--
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]