From: Allan Ford <hidden> Date: 2019-09-13 02:54:24
Dear Git Authors,
Not a bug, but a suggestion consideration for “Git Gui”
Can a double click on the file name in the “unstaged” area move the
item to “staged changes” .. (rather than having to click on the small
icon to the left of the file name?)
cheers, Allan
Dear Git Authors,
Not a bug, but a suggestion consideration for “Git Gui”
Can a double click on the file name in the “unstaged” area move the
item to “staged changes” .. (rather than having to click on the small
icon to the left of the file name?)
It has been something on my radar for some time. Shouldn't be something
too difficult to do.
While I like the idea in general, I have a question that I'd like to ask
other git-gui users:
If we implement something like this, what happens when you single-click
on the icon? Do we treat that as a stage/unstage command? If we keep the
legacy behaviour of single-click on the icon stages/unstages, then a
part of the row is single-click and the rest double-click.
If we make an entire row of the stage/unstage widget double click, it
messes with people who are already used to it.
Is partial single and partial double click behaviour acceptable? Or
should we make the entire row double click only? Or something else that
I missed?
--
Regards,
Pratyush Yadav
On Fri, Sep 13, 2019 at 4:32 PM Pratyush Yadav [off-list ref] wrote:
On 13/09/19 12:24PM, Allan Ford wrote:
quoted
Dear Git Authors,
Not a bug, but a suggestion consideration for “Git Gui”
Can a double click on the file name in the “unstaged” area move the
item to “staged changes” .. (rather than having to click on the small
icon to the left of the file name?)
It has been something on my radar for some time. Shouldn't be something
too difficult to do.
While I like the idea in general, I have a question that I'd like to ask
other git-gui users:
I miss a general problem description: Whats wrong with the
single-click on the icon to begin with?
I consider adding a second way as not not acceptable. I also consider
double-click on a file in a GUI an "open" action. But in git-gui, this
"open" action (showing the diff) is already done with a single-click.
From my point of view, it can stay as is.
Best,
Bert
If we implement something like this, what happens when you single-click
on the icon? Do we treat that as a stage/unstage command? If we keep the
legacy behaviour of single-click on the icon stages/unstages, then a
part of the row is single-click and the rest double-click.
If we make an entire row of the stage/unstage widget double click, it
messes with people who are already used to it.
Is partial single and partial double click behaviour acceptable? Or
should we make the entire row double click only? Or something else that
I missed?
--
Regards,
Pratyush Yadav
On Fri, Sep 13, 2019 at 4:32 PM Pratyush Yadav [off-list ref] wrote:
quoted
On 13/09/19 12:24PM, Allan Ford wrote:
quoted
Dear Git Authors,
Not a bug, but a suggestion consideration for “Git Gui”
Can a double click on the file name in the “unstaged” area move the
item to “staged changes” .. (rather than having to click on the small
icon to the left of the file name?)
It has been something on my radar for some time. Shouldn't be something
too difficult to do.
While I like the idea in general, I have a question that I'd like to ask
other git-gui users:
I miss a general problem description: Whats wrong with the
single-click on the icon to begin with?
The way I see it, there are two parts.
Objectively, it is harder to click the icon than it is to click anywhere
on the entire row. The small size of the icon adds to the problem.
Subjectively, I personally came from using Atom for quite a while, and
it staged the file on double click. I think some other editors do this
too. So, I was used to that way of doing things, and had to adapt to the
git-gui way.
I consider adding a second way as not not acceptable. I also consider
double-click on a file in a GUI an "open" action. But in git-gui, this
"open" action (showing the diff) is already done with a single-click.
Well, that's the other point of view, and it makes sense too. As I was
afraid, this seems to be a personal preference problem and it will be
difficult to reach agreement. And I'm generally inclined to keep things
like they are rather than making drastic changes with debatable benefit.
From my point of view, it can stay as is.
How about something in the middle? How about larger icon sizes? Will
that help your workflow Allan?
quoted
If we implement something like this, what happens when you single-click
on the icon? Do we treat that as a stage/unstage command? If we keep the
legacy behaviour of single-click on the icon stages/unstages, then a
part of the row is single-click and the rest double-click.
If we make an entire row of the stage/unstage widget double click, it
messes with people who are already used to it.
Is partial single and partial double click behaviour acceptable? Or
should we make the entire row double click only? Or something else that
I missed?
From: Marc Branchaud <hidden> Date: 2019-09-13 22:01:43
On 2019-09-13 10:32 a.m., Pratyush Yadav wrote:
On 13/09/19 12:24PM, Allan Ford wrote:
quoted
Dear Git Authors,
Not a bug, but a suggestion consideration for “Git Gui”
Can a double click on the file name in the “unstaged” area move the
item to “staged changes” .. (rather than having to click on the small
icon to the left of the file name?)
It has been something on my radar for some time. Shouldn't be something
too difficult to do.
While I like the idea in general, I have a question that I'd like to ask
other git-gui users:
If we implement something like this, what happens when you single-click
on the icon? Do we treat that as a stage/unstage command? If we keep the
legacy behaviour of single-click on the icon stages/unstages, then a
part of the row is single-click and the rest double-click.
If we make an entire row of the stage/unstage widget double click, it
messes with people who are already used to it.
Is partial single and partial double click behaviour acceptable? Or
should we make the entire row double click only? Or something else that
I missed?
I've always felt this was a bit of user-experience failure on git-gui's
part. Single-click should not behave differently just because you click
the icon. I've seen many new git-gui users find this (mildly) confusing.
I'd be happy if the click behavior was consistent across the entire row:
single-click to select, double-click to stage/unstage, and there's
nothing special about clicking the icon. I personally don't think it
would be hard to adjust to that.
I guarantee you that if double-click support is added while preserving
the icon-single-click, users will get tripped up when they double-click
the icon and accidentally stage two files.
M.
On Sat, 14 Sep 2019 at 08:07, Marc Branchaud [off-list ref] wrote:
On 2019-09-13 10:32 a.m., Pratyush Yadav wrote:
quoted
On 13/09/19 12:24PM, Allan Ford wrote:
quoted
quoted
Not a bug, but a suggestion consideration for “Git Gui”
quoted
quoted
Can a double click on the file name in the “unstaged” area move the
item to “staged changes” .. (rather than having to click on the small
icon to the left of the file name?)
quoted
It has been something on my radar for some time. Shouldn't be something
too difficult to do.
quoted
While I like the idea in general, I have a question that I'd like to ask
other git-gui users:
Thank you for asking.
I've always felt this was a bit of user-experience failure on git-gui's
part. Single-click should not behave differently just because you click
the icon.
I've seen many new git-gui users find this (mildly) confusing.
I acknowledge that consistency is an important aspect of GUI design.
Particularly for new and/or low-competency users. But surely
efficiency must also be valued too. Repetitive strain injury is not
nice. I have some days where I have hundreds or possibly even
thousands of such single clicksto stage and unstage items. Currently
it is possible to review and accumulate them efficiently due to how
that pane responds.
And this seems a very small aspect to learn. if a person is so
"confused" by such a small thing to learn, I wonder what hope they
would have to comprehend git itself.
I'd be happy if the click behavior was consistent across the entire
row: single-click to select,
double-click to stage/unstage
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Please, no.
I can't say it strongly enough. Please do not change stage/unstage
to require double-click. This would be most unwelcome here, unless it
comes with a configuration option to preserve the old behaviour.
Maybe the actual problem is that the present icon (perhaps surprisingly)
has the behaviour of a blank check-box that relocates. I don't wish for
any change, but if the desire for change is irresistable then the
simplest solution is for the icon (that appears to the left of filenames
in the unstaged pane) to be replaced with blank check box that
behaves exactly as the current icon does. That is:
When clicked, it becomes a checked-box alongside the filename in
the staged area. And if that staged-checked-box is clicked, it reverts to
an unchecked-box (instead of the icon) in the unstaged pane.
On Sat, 14 Sep 2019 at 06:51, Bert Wesarg [off-list ref] wrote:
On Fri, Sep 13, 2019 at 4:32 PM Pratyush Yadav [off-list ref] wrote:
quoted
On 13/09/19 12:24PM, Allan Ford wrote:
I miss a general problem description: Whats wrong with the
single-click on the icon to begin with?
No problem here, but see my other message for further thoughts.
I consider adding a second way as not not acceptable. I also consider
double-click on a file in a GUI an "open" action.
Yes!
In fact, I've often fantasized how useful it would be that if I double
clicked on that file name in the unstaged pane or the staged pane,
then that would open the file for editing in my preferred/configured editor.
Now for me *that* would be a very frequently used improvement!
I wonder what other readers think about this idea?
On Sat, 14 Sep 2019 at 06:51, Bert Wesarg [off-list ref] wrote:
quoted
On Fri, Sep 13, 2019 at 4:32 PM Pratyush Yadav [off-list ref] wrote:
quoted
On 13/09/19 12:24PM, Allan Ford wrote:
I miss a general problem description: Whats wrong with the
single-click on the icon to begin with?
No problem here, but see my other message for further thoughts.
quoted
I consider adding a second way as not not acceptable. I also consider
double-click on a file in a GUI an "open" action.
Yes!
In fact, I've often fantasized how useful it would be that if I double
clicked on that file name in the unstaged pane or the staged pane,
then that would open the file for editing in my preferred/configured editor.
Now for me *that* would be a very frequently used improvement!
I wonder what other readers think about this idea?
Sounds reasonable. I've wanted something similar, but for commit
messages.
But one major reason I didn't come up with a patch for editing commit
messages in the editor of your choice is terminal based editors. I don't
think there is any way of finding out the default terminal emulator in
Linux, and I don't think there is a standard way of making terminal
emulator launch programs you want.
So your suggestion works only for GUI based editors. We would have to
mention that only GUI based editors can open files.
I like the idea, but I thought I'd point a problem I saw with this
feature.
Also, the file viewer in git-gui opens the blame viewer, but I suppose
that's not what most people want.
--
Regards,
Pratyush Yadav
On Sat, 14 Sep 2019 at 08:07, Marc Branchaud [off-list ref] wrote:
quoted
On 2019-09-13 10:32 a.m., Pratyush Yadav wrote:
quoted
On 13/09/19 12:24PM, Allan Ford wrote:
quoted
quoted
quoted
Not a bug, but a suggestion consideration for “Git Gui”
quoted
quoted
quoted
Can a double click on the file name in the “unstaged” area move the
item to “staged changes” .. (rather than having to click on the small
icon to the left of the file name?)
quoted
quoted
It has been something on my radar for some time. Shouldn't be something
too difficult to do.
quoted
quoted
While I like the idea in general, I have a question that I'd like to ask
other git-gui users:
Thank you for asking.
quoted
I've always felt this was a bit of user-experience failure on git-gui's
part. Single-click should not behave differently just because you click
the icon.
quoted
I've seen many new git-gui users find this (mildly) confusing.
I acknowledge that consistency is an important aspect of GUI design.
Particularly for new and/or low-competency users. But surely
efficiency must also be valued too. Repetitive strain injury is not
nice. I have some days where I have hundreds or possibly even
thousands of such single clicksto stage and unstage items. Currently
it is possible to review and accumulate them efficiently due to how
that pane responds.
And this seems a very small aspect to learn. if a person is so
"confused" by such a small thing to learn, I wonder what hope they
would have to comprehend git itself.
quoted
I'd be happy if the click behavior was consistent across the entire
row: single-click to select,
double-click to stage/unstage
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Please, no.
I can't say it strongly enough. Please do not change stage/unstage
to require double-click. This would be most unwelcome here, unless it
comes with a configuration option to preserve the old behaviour.
Maybe the actual problem is that the present icon (perhaps surprisingly)
has the behaviour of a blank check-box that relocates. I don't wish for
any change, but if the desire for change is irresistable then the
simplest solution is for the icon (that appears to the left of filenames
in the unstaged pane) to be replaced with blank check box that
behaves exactly as the current icon does. That is:
When clicked, it becomes a checked-box alongside the filename in
the staged area. And if that staged-checked-box is clicked, it reverts to
an unchecked-box (instead of the icon) in the unstaged pane.
Hmm, I like this idea. But right now the icons also show the state of
the file (modified, added, etc.), so if you switch them to a checkbox
you lose that information. Are you and other people willing to lose that
information.
Though I've personally never been a huge fan of those icons. They never
really managed to convey too much meaning to me. So I won't mind
changing them to something like the single-letter git-status status
flags. This also gives us a bit of consistency with git-status's flags,
so people used to the command line will recognize them instantly.
Thoughts?
--
Regards,
Pratyush Yadav
On Sun, 15 Sep 2019 at 05:08, Pratyush Yadav [off-list ref] wrote:
On 15/09/19 02:07AM, David wrote:
quoted
On Sat, 14 Sep 2019 at 06:51, Bert Wesarg [off-list ref] wrote:
quoted
quoted
I consider adding a second way as not not acceptable. I also consider
double-click on a file in a GUI an "open" action.
Yes!
In fact, I've often fantasized how useful it would be that if I double
clicked on that file name in the unstaged pane or the staged pane,
then that would open the file for editing in my preferred/configured editor.
Now for me *that* would be a very frequently used improvement!
I wonder what other readers think about this idea?
Sounds reasonable. I've wanted something similar, but for commit
messages.
But one major reason I didn't come up with a patch for editing commit
messages in the editor of your choice is terminal based editors.
Hi again Pratyush Yadav, and other readers!
I hope I don't sound like I am arguing or enthusiastically promoting change
in this subthread. I'm not, my attitude is rather just to explore an idea to see
what others think of it. Some days I have good ideas, other days my ideas
have flaws that I missed, so I like to discuss first.
More important, I want to say that I am very happy to see that there are
folks interested to discuss the Tcl/Tk git GUI tools. In fact I have local Tcl
patches myself, bugfixes and enhancements for git-gui and gitk, which I
would be happy to share except that I do not know how to do that effectively.
I don't enjoy Tcl and because of that I have avoided it and don't consider
my skill level to be very high. I find it rather obtuse, especially the way
it does namespacing, and "upvar" in particular. I struggle to read it without
comments. But I learned enough of Tcl specifically to improve aspects
of git-gui and gitk that were bothering me in the past.
As well as bug fixes, I have enhancements to both that greatly assist
my workflow. For example, in git-gui, I have a hotkey that pastes the
currently highlighted pathname into the commit message. In gitk,
I have added "find all files in commit" to the file list pane, and fixed
the flawed regex matching and associated controls.
My workflow involves a lot of large rebases, and merge conflicts can occur
in the middle of them that affect dozens of files, that need editing
to resolve. That's where easily being able to start an editor from git-gui
in that situation would benefit my workflow. But, it's not a big deal.
Now, to specific comments you made:
I don't
think there is any way of finding out the default terminal emulator in
Linux, and I don't think there is a standard way of making terminal
emulator launch programs you want.
I agree where you say there is no "standard way", because the
various GUI environments are not consistent (Gnome, LXDE, etc) and
neither are the command line arguments of various terminal emulators,
and sometimes those don't work as expected.
So your suggestion works only for GUI based editors. We would have to
mention that only GUI based editors can open files.
Here, I disagree. My suggestion was to provide a double-click facility
that would trigger a command that can be *configured by the user*.
And it is wrong to say that only GUI editors can open files.
For example, my OS is Debian, my GUI is LXDE, and my terminal
emulator is lxterminal. (I don't recommend it, but that's another story).
If I have a terminal window open, I can type the command:
$ lxterminal -e vi foo
and a new independent terminal window opens with the editor 'vi'
editing the file foo. Similar functionality can be achieved from a
.desktop file, or from a shell script.
Here is a demo Tcl script (working here) that confirms one way
of spawning an editor from Tcl in a terminal window under LXDE:
##### begin script #####
#!/usr/bin/tclsh
package require Tk
# name of this script
set scriptname [info script]
# demo user command
set command "lxterminal -e vi -R $scriptname"
# create text widget
pack [text .t]
# add text to show that we are running
.t insert end "$scriptname: Running: $command\n"
# run the demo command
set chan [open "| $command"]
# (at this point, a new terminal window appears
# containing vi displaying this script file)
# add text to show that we did not block on command
.t insert end "$scriptname: Reached end\n"
##### end script #####
On Sun, 15 Sep 2019 at 07:24, Pratyush Yadav [off-list ref] wrote:
On 15/09/19 01:57AM, David wrote:
quoted
I can't say it strongly enough. Please do not change stage/unstage
to require double-click. This would be most unwelcome here, unless it
comes with a configuration option to preserve the old behaviour.
Maybe the actual problem is that the present icon (perhaps surprisingly)
has the behaviour of a blank check-box that relocates. I don't wish for
any change, but if the desire for change is irresistable then the
simplest solution is for the icon (that appears to the left of filenames
in the unstaged pane) to be replaced with blank check box that
behaves exactly as the current icon does. That is:
When clicked, it becomes a checked-box alongside the filename in
the staged area. And if that staged-checked-box is clicked, it reverts to
an unchecked-box (instead of the icon) in the unstaged pane.
Hmm, I like this idea. But right now the icons also show the state of
the file (modified, added, etc.), so if you switch them to a checkbox
you lose that information. Are you and other people willing to lose that
information.
Though I've personally never been a huge fan of those icons. They never
really managed to convey too much meaning to me. So I won't mind
changing them to something like the single-letter git-status status
flags. This also gives us a bit of consistency with git-status's flags,
so people used to the command line will recognize them instantly.
Thoughts?
Ah, this is hilarious and embarassing. It confirms what I wrote in my other
message:
Some days I have good ideas, other days my ideas
have flaws that I missed, so I like to discuss first.
ie, Some days I'm an idiot! I completely forgot about those other icons!
I like them! In particular, the one that indicates removed files, and
the special one that indicates when a committed file has been replaced
by a symlink, or vice versa, are very valuable to me.
I don't really want any of this to change. I only suggested the change
because I didn't want to appear totally negative. So I tried to come up
with an alternative suggestion. But it was a dumb proposal.
So dumb in fact that I'm now arguing against it :(
Oh well :D
Anyway, I'm a fan of those icons, please don't change them.
On Sun, 15 Sep 2019 at 05:08, Pratyush Yadav [off-list ref] wrote:
quoted
On 15/09/19 02:07AM, David wrote:
quoted
On Sat, 14 Sep 2019 at 06:51, Bert Wesarg [off-list ref] wrote:
quoted
quoted
quoted
I consider adding a second way as not not acceptable. I also consider
double-click on a file in a GUI an "open" action.
Yes!
In fact, I've often fantasized how useful it would be that if I double
clicked on that file name in the unstaged pane or the staged pane,
then that would open the file for editing in my preferred/configured editor.
Now for me *that* would be a very frequently used improvement!
I wonder what other readers think about this idea?
Sounds reasonable. I've wanted something similar, but for commit
messages.
But one major reason I didn't come up with a patch for editing commit
messages in the editor of your choice is terminal based editors.
Hi again Pratyush Yadav, and other readers!
I hope I don't sound like I am arguing or enthusiastically promoting change
in this subthread. I'm not, my attitude is rather just to explore an idea to see
what others think of it. Some days I have good ideas, other days my ideas
have flaws that I missed, so I like to discuss first.
More important, I want to say that I am very happy to see that there are
folks interested to discuss the Tcl/Tk git GUI tools. In fact I have local Tcl
patches myself, bugfixes and enhancements for git-gui and gitk, which I
would be happy to share except that I do not know how to do that effectively.
I don't enjoy Tcl and because of that I have avoided it and don't consider
my skill level to be very high. I find it rather obtuse, especially the way
it does namespacing, and "upvar" in particular. I struggle to read it without
comments. But I learned enough of Tcl specifically to improve aspects
of git-gui and gitk that were bothering me in the past.
I have quite the opposite experience with Tcl. I've been a C person for
a long time, and was never a big fan of scripting languages. But I have
been enjoying hacking in Tcl. But I do agree that some parts of Tcl are
rather strange, and not easy for readability.
I'd be happy to look at your enhancements, and try to fine tune the
code, but I would point out that some things might just be too specific
to your workflow, and won't work for the rest of the people using
git-gui. So do take that into account if you do decide to send some
improvements in.
As well as bug fixes, I have enhancements to both that greatly assist
my workflow. For example, in git-gui, I have a hotkey that pastes the
currently highlighted pathname into the commit message. In gitk,
I have added "find all files in commit" to the file list pane, and fixed
the flawed regex matching and associated controls.
FYI, I'm not the maintainer of gitk. So patches for it should be sent to
Paul Mackerras [off-list ref].
My workflow involves a lot of large rebases, and merge conflicts can occur
in the middle of them that affect dozens of files, that need editing
to resolve. That's where easily being able to start an editor from git-gui
in that situation would benefit my workflow. But, it's not a big deal.
Now, to specific comments you made:
quoted
I don't
think there is any way of finding out the default terminal emulator in
Linux, and I don't think there is a standard way of making terminal
emulator launch programs you want.
I agree where you say there is no "standard way", because the
various GUI environments are not consistent (Gnome, LXDE, etc) and
neither are the command line arguments of various terminal emulators,
and sometimes those don't work as expected.
quoted
So your suggestion works only for GUI based editors. We would have to
mention that only GUI based editors can open files.
Here, I disagree. My suggestion was to provide a double-click facility
that would trigger a command that can be *configured by the user*.
And it is wrong to say that only GUI editors can open files.
For example, my OS is Debian, my GUI is LXDE, and my terminal
emulator is lxterminal. (I don't recommend it, but that's another story).
If I have a terminal window open, I can type the command:
$ lxterminal -e vi foo
Ah! I have used this many times (for gnome-terminal), but for some
reason it didn't occur to me to have a customizable editor command.
FWIW, I am in favor of something like this being used in git-gui.
and a new independent terminal window opens with the editor 'vi'
editing the file foo. Similar functionality can be achieved from a
.desktop file, or from a shell script.
Here is a demo Tcl script (working here) that confirms one way
of spawning an editor from Tcl in a terminal window under LXDE:
##### begin script #####
#!/usr/bin/tclsh
package require Tk
# name of this script
set scriptname [info script]
# demo user command
set command "lxterminal -e vi -R $scriptname"
# create text widget
pack [text .t]
# add text to show that we are running
.t insert end "$scriptname: Running: $command\n"
# run the demo command
set chan [open "| $command"]
# (at this point, a new terminal window appears
# containing vi displaying this script file)
# add text to show that we did not block on command
.t insert end "$scriptname: Reached end\n"
##### end script #####
If you would volunteer to send patches implementing something like that,
I would be happy to review. As for me doing it myself, I can't really
say if or when I can get to it. I have limited time available, and there
are some other things I'd rather do first.
--
Regards,
Pratyush Yadav