Skip to content

More submodule improvements - #15237

Merged
sergiou87 merged 8 commits into
developmentfrom
more-submodule-improvements
Sep 7, 2022
Merged

sergiou87 merged 8 commits into
developmentfrom
more-submodule-improvements

Conversation

@sergiou87

Copy link
Copy Markdown
Member

Closes #7691

Description

While looking into #7691 I realized we could also render submodules nicely in the Commit/History view could be useful. This PR does exactly that. Main changes/differences:

  • While for active changes we use git status, for commit changes we use git log, and the output is different. In order to detect submodules, we must look for the file mode 160000.
  • In commits, submodules cannot have untracked or modified changes.
  • Verbs change in the submodule diff screen, reflecting active vs past change.
  • Sometimes, a submodule referenced within a commit doesn't exist anymore and cannot be opened, therefore the Open Repository quick action must be removed.
  • Suggestions also change: in active changes context we suggest the user which changes can be committed and which cannot. That doesn't make sense within a commit.
  • Added info about the commit a submodule is pointing at for added/deleted submodules.

Screenshots

image
image
image
image

Release notes

Notes: no-notes

- Show commit a new submodule is pointing at
- Show commit a deleted submodule was pointing at when it was removed
- Render submodule diffs in commits in History view, stash, etc.

@niik niik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks fantastic @sergiou87! Just a small question

Comment thread app/src/lib/git/log.ts Resolved
@sergiou87
sergiou87 requested a review from niik September 6, 2022 15:00
@sergiou87
sergiou87 merged commit 0cddbd0 into development Sep 7, 2022
@sergiou87
sergiou87 deleted the more-submodule-improvements branch September 7, 2022 08:09
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.

syntax highlighting error when rendering submodule diff

2 participants