Re: Recent git changes and unmerged files



On 12 May 2010 07:11, Peter Tyser <ptyser gmail com> wrote:
<snip>
>> Personally, I wouldn't expect to see any changes that I'd already
>> staged. In my mind, changes already present in the index are done, and
>> I don't need to worry about them. I just want Meld to help me get the
>> rest of it staged... but I realise that others may feel differently.
>
> That makes sense.  I can see both sides too.  'git diff' behaves as
> you describe - it only shows unstaged changes for what its worth.

I think that's probably *why* I expect Meld to work like this, rather
than any deeper conviction about how it should work.

> For
> me, the one big use of being able to view staged changes is to review
> changes prior to finally committing them.  Eg during a large change I
> might update the index multiple times and its nice to give those
> changes one final review prior to committing them.

That's actually a thoroughly sensible use case.

>> If we want to include already staged changes *and* deal with unmerged
>> statuses, etc. then your approach is probably the right one. If we
>> don't need staged changes and such, then will git-diff-files suffice?
>
> It seems like git-diff-files would suffice...  Also, the fact that it
> mirrors the functionality of 'git-diff' is a pretty strong argument to
> use it instead of the 'git-diff-files + git-diff-index'.  I'd think:
> 1. In a perfect world it'd be nice to support being able to diff both
> staged and unstaged files.  Perhaps a "staged" filter like the current
> Modified/Normal/NonVC ones, or possibly adding new states to the
> "Status" column that could have values such as "Modified/Staged",
> "Modified", "Added/Staged", etc.
> 2. If #1 is viewed as too invasive or not worth the effort, I like
> your solution of just using 'git-diff-files -0'.

So... in the face of indecision, the immediate solution should be the
one that maintains current behaviour, which is to show both staged and
unstaged files. If you could send an updated version of your earlier
patch, I'll commit that. (Oh, and you don't need to import Sets; we
require python 2.4.)

I think that adding the ability to toggle between viewing
staged/unstaged files is a good idea. I'm uncertain what the UI should
be -- it is, in a way, different to other filters -- but it would
require some changes to the VC system, and whatever was added would
need to work for all appropriate VCs. Anyone want to open a bug?

cheers,
Kai


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]