tibirna / qgit

Official git repository for QGit.
Other
171 stars 66 forks source link

Show newly added files in "working directory changes" #130

Open wwestrop opened 1 year ago

wwestrop commented 1 year ago

Files which are newly to a repository (but which are not yet staged) do not appear in the lower right pane in QGit.

This patch now causes them to appear there in green (consistent with how new files are shown in the commit dialog)

show-new-files

tibirna commented 1 year ago

My apologies for the long delay.

This change would conflict with the ability to distinguish new files added to the index (which currently appear in green in the right-hand panel) from working files not yet accounted for in the git repo.

For example, using a qgit version without your patch, use the "Edit > Commit" command to add your 'newFile.txt' to the index (check it's checkbox and click "Update Index"). (Or you can use the git command line to git add the file then hit F5 in qgit to update).

Contrast this with the behaviour of your patch, especially if you try with one file not yet added to the index and one added.

Note that the files in the working directory not yet added to git appear listed in the "Log" of the working directory under "Untracked files".

(While testing this I noticed that there is currently no way to remove a new file from the index using the "Commit" dialog, which is a bug: https://github.com/tibirna/qgit/issues/133.)

Thanks Cristian