Hey,

On Tue, Sep 8, 2009 at 6:28 PM, JDS<[email protected]> wrote:
>
>
> Looks very nice.
>
> I worry though that we might be mixing metaphors a bit.  The bulk of
> the items in the sidebar mock-up allow you to choose a branch for
> viewing its history.  Commit allows you to commit unstaged changes on
> the "working" branch you were in when you started GitX (I guess; this
> has never been clear to me).  The difference between the "current
> viewed branch" and the "branch where commits go" is not at all obvious
> in GitX at present, and will become much less obvious once the sidebar
> is there in both views, reminding you of this disparity.  Along those
> lines, I feel the sidebar should be kept exclusively for "sources and
> targets"; i.e. either sources for history, or targets for committing,
> but not "Actions".

Yes, I agree. The current scheme at least has wrong naming, but I'm
not sure if the metaphore couldn't be pushed in the right direction a
bit by naming it something else. For example, an option with the name
"Index" would indicate what the view would show. The problem then is
that some folks won't recognize the Index as being the commit view.

> Ideally, you would be able to select a branch either for viewing, or
> for committing on.  Obviously, you can't commit to tags or "All
> branches" so we'd need some way to discriminate these.  One sensible
> option would be to indicate via another icon, color, or both in the
> sidebar that a branch has staged/unstaged changes that *can be
> committed*.  Tags and remotes, etc. would obviously never have this
> indication.  Only one branch can have unstaged changes.[1]

I think one thing that we have wrong currently is that we don't
represent the 'currently checked out branch' in any way. The HEAD is a
very important concept in git, as you can only commit (sanely) on the
current branch. It'll be very hard to implement committing on an
alternative branch.

Similarly, you would want an option in GitX where you always see the
current branch, so that if you switch branches and refresh, the view
would show the new branch, rather than still displaying the old branch
(as is currently the case -- start gitx, switch a branch, and it'll
still show master).

If we can represent this current branch in some way in the tree view,
we might be able to attach the commit view to that in some way -- for
example by showing a batch with 'commit...' in it, or a small arrow
pointing right, like the arrows in iTunes that bring you to the store.

I'm not at all sure about this, but my gut feeling is that it should
be possible to represent these concepts in the tree.

> When such a "commitable" branch is selected, an single toggle icon  --
> "Commit/View" -- is enabled (disabled for branches without changes).
> If you are already in commit view, selecting another commitable branch
> just changes the target for commits (and the staged changes on that
> branch are updated, etc.).  If you have unstaged changes on the
> current branch, you will be warned that they would be lost, and
> prompted whether to continue (which would invoke checkout -f).[1]

You would have to switch branches for that to work. I think in that
case you'll cause confusion between two different actions: committing
and switching. I'm not sure people will understand why they suddenly
changed branches just because they went to the commit view, but didn't
actually commit anything.

> Another related and useful metaphor would be to show a notional
> history element for staged + unstaged changes directly at the top of
> the history graph (with a special color), allowing you to double click
> them to switch to commit view.  Again, these would only appear on true
> "commitable" branches.

I guess, gitk does something similar. Being able to view the current
changes without switching to the commit part is probably very useful.
I'm not sure what to do with those changes though. Doubleclicking
doesn't seem very intuitive, but perhaps a button in the detailed
part? It all sounds a bit icky to me. Especially if you only want to
commit new files, so there is no 'local changes' item in the history.

> Also, a small one... the "Create branch" could be moved below the
> sidebar as a small "+", like various other tools.

We could add something like that. I've looked around a bit, and
iTunes, Address Book and iPhoto do the same, though Address Book has a
different + widget from the rest. We should also allow clicking for
name editting, and drag & drop support. Also a context menu to check
out other branches would be nice.

> JD

> [1] This would be a natural place to add a "stash" interface of
> unstaged changes in the future if there were interest.

Reply via email to