Re: [ANNOUNCE] tig-0.14

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

 



On Mon, 16 Feb 2009 00:47:05 +0100, Jonas Fonseca <jonas.fonseca@xxxxxxxxx> wrote:

On Fri, Feb 13, 2009 at 00:14, Tilo Schwarz <tilo@xxxxxxxxxxxxxxx> wrote:
Then I have another question: Did you ever thought of a branch view, where you can see, create, delete and merge the different branches which are in a
git project.

I have thought about it. The question is if a separate view is
necessary or if the main view would do. For example, I sometimes use
gitk when I need to rename branches or prepare for rebasing a
patchset. One idea I would like to explore is to provide a compressed
version of the main view, where "intermediate" commits are hidden,
this way you could easily get a view of the relationship between
branches.

I'm not sure if I understood it correctly. Do you mean, only commits are shown, which are heads of some branch? If so, what if more than one head points to the same commit?

The branch thing came into my mind, because it's the only thing which keeps me from using tig exclusively. I sometimes switch to git-gui to do the branch handling. Since I really like those "one key press is one command" kind of programs like tig (or mc, aptitude, mocp, ...), it would be really nice to have the branches in tig too. The nice thing of programs like tig is (matter of taste of course), that once you get used to the keys, you don't have to think about commands anymore, you just do them.

I think I would prefer a branch view, because then one could also have a branch-view keymap with specialized commands. One possibility would be (just as example):

The view shows something like this (here an example from the tig git repository)

  master
* my_feature_bar
X my_feature_foo
  origin/HEAD
  origin/master
  origin/release

The current branch is marked by '*'. Now let's assume, I am with my cursor on the line with the 'X', I could think of the keys

d (d)elete the X-marked branch, given is has already been merged into another branch
n create a (n)ew branch, based on the X-marked branch,
  ask for the new name and (maybe checkout the new branch)
c (c)heckout the branch
r (r)ename the branch
R (r)eset branch
...

I don't think it's necessary to reproduce all the nice options git-gui has, but if there would be a branch view with the most used 5 commands / work steps, it would cover 95% of the daily "branch work" which is needed. And it would be simply awesome, if we could do this without leaving tig, but instead use this very nice and fast "one key, one command" also for the branches. Of course the more complicated and special cases can be always handled by tig by pressing ':' and entering a git command.

The simplest thing to make it easier to experiment with new features
would probably be to introduce a new external command specifier:
%(prompt:<msg>), possibly with some regex for validation. Then you
could add in your ~/.tigrc:

bind main A !git branch %(prompt:^wip/[a-z-]+$:Name) %(commit)

Ahh, ok, so tig would issue a prompt and ask me for the name?


Thanks for the great program!


BTW, is the git list the right list to discuss bugs / patches for tig?

Best regards,

    Tilo
--
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]

  Powered by Linux