Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enhanced view of uncommitted changes in Browse Repository #4031

Closed
gerhardol opened this issue Oct 1, 2017 · 18 comments
Closed

Enhanced view of uncommitted changes in Browse Repository #4031

gerhardol opened this issue Oct 1, 2017 · 18 comments

Comments

@gerhardol
Copy link
Member

gerhardol commented Oct 1, 2017

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
It is possible to see staged/working directory changes in the Browse Repository, but the behavior can be improved:

Future

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?

  • Diff tab shows changed files and the difference to latest commit. Should show diff to any commit.
  • Clean up for the menu options for virtual commits (Reset, Blame etc)

I have moved some related suggestions to #564. A few of them could be seen as improvements in this feature too.

  • Stage/Unstage for the virtual commits
  • See number of changed (and new, removed, renamed?) files as in the Commit button

Considered but dropped suggestions:

  • Improve information for "Commit index" and "Current unstaged changes" in the tree view:

    • See preliminary ("last") commit message
      -> While this could be interesting, it will only be a subset of the Diff tab anyway.
  • See Commit tab, for complete commit message (and parent hash)
    -> Just minor of the info is relevant, quite simple to just select the current HEAD anyway.

  • File tree tab is currently hidden for unstaged. Should show similar info as for a commit (staged the index tree, unstaged just file explorer?.
    -> There seem to be no obvious way to get the file tree for staged, 'ls-tree' has no --cached option. For unstaged a file explorer could be implemented though.
    Note: Both Commit, FileTree tabs reenbled for artificial commits in fix: Do not hide tabs for artificial commits #4275

Environment you encounter the issue:

  • GitExtensions version: 2.50.02
  • GIT version: 2.14.1
  • OS version: Win10

Did this work in previous version of GitExtensions (which)?
Same in all GitExt

@jbialobr
Copy link
Member

jbialobr commented Oct 1, 2017

The working dir changes can be seen from the Browse window, but there is no ability to perform commit related actions. See https://git-extensions-documentation.readthedocs.io/en/latest/settings.html#git-extensions-performance-working-dir-changes

@gerhardol
Copy link
Member Author

Great - how did I miss that setting? (Should be on by default - what is slowing down?).

This feature request is then about how this should work - mostly all already marked with "Enhancement". I can rephrase the description.

@jbialobr
Copy link
Member

jbialobr commented Oct 1, 2017

what is slowing down?

I don't know, never have experience a slow down. You should ask the author.

I can rephrase the description.

Please do that, as it is already very long. Could you also attach sketched pictures of existing windows showing us new buttons, context menus and other changes you would like to do. Perhaps we will create new subissues to discus each proposed change in separation (I predict long discussions here, see #564 it may be helpful).

@gerhardol gerhardol changed the title Working Directory and Staged changes could be visible as commit and stash in Browse Repository Enhanced view of uncommitted changes in Browse Repository Oct 1, 2017
@gerhardol
Copy link
Member Author

Rephrased the description, moved some parts to other issues. For instance editing unstaged commit message could be "implemented in the context of this issue" but at least pull requests should be separate. But most of the basic functionality I wanted is already implemented!

@RussKie
Copy link
Member

RussKie commented Oct 3, 2017 via email

@gerhardol
Copy link
Member Author

gerhardol commented Oct 3, 2017

Commit comment by @spdr870:

This new feature is by default disabled. The revisions are always shown because checking if there are uncommitted changes is just to slow when working in a large repository.

Anything different from GetAllChangedFiles() (that I assume is what slowing down) compared to what is done for the Commit count button?
What is the limiting factor, number of checkout files? What is large? I assume submodules should be included.

@RussKie Thanks for finding this. I am lost in the code (of course, randomly looking at a problem will get one lost).

I believe #4033 should result in default being changed for new installations, similar to other clients (but GitExt can do this better).
Works OK for me (but what is large?)

@gerhardol
Copy link
Member Author

I have implemented a rough version of the "Diff" changes. There is currently a lot of special checks for artificial commits, a lot of that handling can be replaced with special diff options. However, some special handling should be added for the menu items (all current options are not relevant like "diff to local").

I updated the description some.

I currently plan to clean up the handling and submit three merge requests:

@gerhardol
Copy link
Member Author

https://github.com/gerhardol/gitextensions/tree/feature/n4031-artificial-commit-diff

A branch with changes I would like to do to improve this handling
I will This does not include enabling the functionality by default (that is #4033) but a few steps to avoid the popup commit as in #564

The handling for artificial commits was simplified for diff, but code was added to handle artificial commits properly in other situations (there were a lot functions that does not work well with artificial commits already). I also added some new functionality, some inspired from Commit menu options.

I will submit some separate patches to start with. As the changes have evolved together over time and I have rebased and squashed continuously, the changes has not been tested in this order.
(I may retire this branch and start a new if I have not made pull requests yet for the changes).

@gerhardol
Copy link
Member Author

First set of PRs submitted. Awaiting primarily #4079 before continuing, will probably close and reopen #4081 due to #4079

The most important commit is gerhardol@7234d28

@jbialobr
Copy link
Member

Do you think that this empty place (for artificial revisions) could be used for commit message and commit button?

gitext

https://git-extensions-documentation.readthedocs.io/en/latest/settings.html#detailed-browse-repository-window-show-revision-details-next-to-the-revision-list

gerhardol added a commit to gerhardol/gitextensions that referenced this issue Dec 17, 2017
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Dec 31, 2017
… count at changes

Part of gitextensions#4031
* Move out UI specific from ToolStripGitStatus to GitStatusMonitor
* Restructured and moved the code in GitStatusMonitor to respective groups (public, private, handlers etc)
* Added events to notify consumers. The update of GUI components is moved from GitStatusMonitor to FormBrowse, also updating artificial commit count
@RussKie
Copy link
Member

RussKie commented Jan 3, 2018

@gerhardol do you think we can close the current issue for the work which went into 2.51, and start a new issue for the remaining work which will go into the next version?

@gerhardol
Copy link
Member Author

#4209 is connected to this issue, can be connected to a new.
I have seen a few other details too (existing, not regressions so far), separate issue planned.
Tag with 2.51 1nd close it.

@RussKie RussKie added this to the 2.51.RC1 milestone Jan 3, 2018
@RussKie
Copy link
Member

RussKie commented Jan 3, 2018

Awesome job, mate.
Please open a new issue for further work.

@RussKie RussKie closed this as completed Jan 3, 2018
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Jan 5, 2018
RussKie pushed a commit that referenced this issue Jan 6, 2018
* Move ToolStripGitStatus to GitStatusMonitor, update artificial commit count at changes

Part of #4031
* Move out UI specific from ToolStripGitStatus to GitStatusMonitor
* Restructured and moved the code in GitStatusMonitor to respective groups (public, private, handlers etc)
* Added events to notify consumers. The update of GUI components is moved from GitStatusMonitor to FormBrowse, also updating artificial commit count
@RussKie RussKie modified the milestones: 2.51.RC1, 2.51.RC2 Jan 6, 2018
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Jan 7, 2018
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Jan 7, 2018
Issue gitextensions#4031 had several issues that improved the functionality and limited unusable menus, but some checks were not entirely correct or could be simplified to just limit on IsTracked
Some diff-to-parent were not always shown

FileHistory and Blame should be disabled for Untracked
Browse Diff disabled for all artificial but formDiff did not not disable for any

Browse Diff Cherry-pick completely disabled for artificial
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Jan 8, 2018
…have a consistent naming

This was discussed in gitextensions#4313, the core files in the PR was changed already
firstRevision/secondRevision was the most commonly used arguments. Some arguments have been aligned to from/to in gitextensions#4031 PRs.
Other names discussedwas revA/revB.
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Jan 9, 2018
…have a consistent naming

This was discussed in gitextensions#4313, the core files in the PR was changed already
firstRevision/secondRevision was the most commonly used arguments. Some arguments have been aligned to from/to in gitextensions#4031 PRs.
Other names discussed was revA/revB.
gerhardol added a commit that referenced this issue Jan 12, 2018
#4344)

* Rename arguments related to diff to firstRevision, secondRevision to have a consistent naming

This was discussed in #4313, the core files in the PR was changed already
firstRevision/secondRevision was the most commonly used arguments. Some arguments had previously been aligned to from/to in #4031 PRs.
Other names discussed was revA/revB.
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Jan 28, 2018
Issue gitextensions#4396
Issue gitextensions#4031 had several PRs that improved the functionality and limited unusable menus, but some checks were not entirely correct or could be simplified to just IsTracked
Some diff-to-parent were not always shown

FileHistory and Blame must be disabled for Untracked files
Browse Diff disabled for all artificial but formDiff did not not disable for any

Browse Diff Cherry-pick completely disabled for artificial
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Mar 8, 2018
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Mar 10, 2018
gerhardol added a commit to gerhardol/gitextensions that referenced this issue Mar 11, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants