Selection not usable on currently modified directory #155

petoju opened this Issue Dec 15, 2012 · 1 comment


None yet

2 participants

petoju commented Dec 15, 2012


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 commented Jan 7, 2013

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 added a commit that closed this issue Jan 22, 2013
@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š <>
Signed-off-by: David Aguilar <>
@davvid davvid closed this in 05b6c7d Jan 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment