Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Selection not usable on currently modified directory #155

Closed
petoju opened this Issue · 1 comment

2 participants

@petoju

Hello,

git cola selection is not usable, when there runs a program, that modifies files.
A bit extreme example

cd /tmp/
mkdir unusable-demo
cd unusable-demo
git init .
echo "important file" > ifile
echo "tmp file of editor" > bad_file
git add ifile
git commit -m "First important file"
echo "modified important1" >> ifile
echo "modified important2" >> ifile
git cola

and in another terminal

while :; do printf "" >> bad_file; done

And now try staging only "modified important2" line from ifile by selecting it in git cola. You will see, that selection is being cancelled, that is not expected behavior, as I see it.

@davvid
Owner

Thanks for the heads-up. This is likely because the "python-inotify" module is installed, and it will automatically refresh the GUI when it gets events from the filesystem.

We should probably do a better job of saving/restoring the user's selection.

@davvid davvid closed this issue from a commit
@davvid davvid widgets.diff: Save and restore selection across updates
git-cola's inotify integration causes it to automatically refresh itself
when files are changed by another process.

This can be problematic because refreshing the "diff" viewer causes it
to lose the user's selection.

Teach the "diff" viewer to save and restore the selection when its
contents change.  When no selection is present, restore the previous
cursor position.

Closes #155

Reported-by: Peter Júnoš <petoju@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
05b6c7d
@davvid davvid closed this in 05b6c7d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.