Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: Do not hide tabs for artificial commits #4275

Merged
merged 1 commit into from Dec 29, 2017

Conversation

RussKie
Copy link
Member

@RussKie RussKie commented Dec 26, 2017

Dynamically added/hidden tabs added implementation complexity, reduced UX and caused regressions under Mono.
Tabs now remain visible for artificial commits and provide minimal information.
Closes #4242
Obsoletes #4254 #4273

Screenshots before and after (if PR changes UI):
image
image
image

Has been tested on (remove any that don't apply):

  • GIT 2.10 and above
  • Windows 10 and above

@RussKie RussKie added this to the 2.51 milestone Dec 26, 2017
Dynamically added/hidden tabs added implementation complexity, reduced
UX and caused regressions under Mono.
Tabs now remain visible for artificial commits and provide minimal information.
Closes gitextensions#4242
@gerhardol
Copy link
Member

Discussions in the issue on how I would have preferred the change, PR comments here.

FormBrowse line 252, 253: Remove, not needed

FormFileHistory: Remove line 245-255 to have the same handling as in FormBrowse.
Update line 73 to remove artificial check (keep removal for submodules).

var workingDir = new GitRevision(Module, GitRevision.UnstagedGuid)
{
Author = userName,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fake info should be avoided. More in issue comments.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree that it is a fake info - it is the name of the individual making changes. This information comes from the gitconfig. Same applies to the email.

AuthorEmail = userEmail,
Committer = userName,
CommitDate = DateTime.MaxValue,
CommitterEmail = userEmail,
SubjectCount = unstageCount,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SubjectCount is special, separate first or last in the block.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid I don't understand what you mean.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Information for a commit is static, except BuildInfo and SubjectCount (that is merged to Subject). Separate SubjectCount from the static fields.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now GitRevision depends on an instance of GitModule which isn't static. So the artificial revision instances need to be context aware...
CheckUncommitedChanged is called once whenever the graph is refreshed, so performance hit is probably minimal.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I suggest leave it as is. Git revision impact should be low (that the content is not static supports my point, but we already have had this discussion).

Separate CheckUncommitedChanged is removed (shared with commit button) in #4209

@RussKie
Copy link
Member Author

RussKie commented Dec 27, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants