Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Against what version we should compare locally changed file?

Hi all,

> -----Original Message-----
> From: egit-dev-bounces@xxxxxxxxxxx [mailto:egit-dev-
> bounces@xxxxxxxxxxx] On Behalf Of Gunnar Wagenknecht
> 
> Likely.
> 
> Dariusz, in what context are you working?

The discussion is about the synchronize view. There we have the nodes <working tree> and <staged changes>. The compare editor opens when a user double clicks on an entry.

<working tree>
	filex
	filey
<staged changes>
	filex
	filez

What should be the other side to compare with if the user double clicks on an entry below <working tree>? 
There are two cases to distinguish:
a) there are no staged changes for the file
b) there are staged changes for the file

My proposal is to compare with the index in both cases. This is, as Mark and Thomas have mentioned, the default in git. (Hi Thomas, nice to meet you here ;-)

In case a) the content is just the same as in HEAD, but I think we should nevertheless show the label "Index" in the compare editor instead of the commit id of HEAD. This would be more consistent and the user can see that we always compare with the index. The user can see the fact that there are no changes in the index compared to HEAD from the label decoration and also because there is a corresponding entry in the <staged changes> node.

Stefan


Back to the top