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

Git history #1176

Merged
merged 1 commit into from
Feb 15, 2018
Merged

Git history #1176

merged 1 commit into from
Feb 15, 2018

Conversation

jbicker
Copy link
Contributor

@jbicker jbicker commented Jan 31, 2018

Open Git History from File Navigator for certain folder:
openfromfilenavigator

...or file. In this case the commit element in the list is not expandable and opens the diff editor for the file directly on double click or enter:
opensinglefilehistory

...or open it from View Menu or toggle with [ALT]-h:
openviaviewmenuanfshortcut

Navigate as you know it from the File Navigator with Arrow-Keys and open files with ENTER:
navigation

The History-List gets loaded lazy (after [GIT_HISTORY_MAX_COUNT] elements):
lazyloading

}
if (options) {
const range = this.mapRange(options.range);
args.push(...[range, '-C', '-M', '-m']);
Copy link
Contributor

Choose a reason for hiding this comment

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

If options is not given, we miss the -C -M -m too, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, should be separated.

}
args.push(...['--name-status', '--date=unix', `--format=%n%n%H%n%aE%n%aN%n%ad%n%ar%n%s`, '-z', '--']);
if (options && options.uri) {
const file = Path.relative(repository.localUri, options.uri);
Copy link
Contributor

@kittaakos kittaakos Jan 31, 2018

Choose a reason for hiding this comment

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

I think this will not work on Windows. You cannot just use node's path to relativize the URIs, we need to convert to FS paths first.

@jbicker jbicker requested a review from svenefftinge January 31, 2018 11:17
@jbicker jbicker force-pushed the git-history branch 2 times, most recently from c025401 to fab622e Compare February 2, 2018 07:16
@jbicker jbicker requested review from kittaakos and akosyakov and removed request for svenefftinge February 2, 2018 07:32
@jbicker jbicker force-pushed the git-history branch 2 times, most recently from 245afd7 to 50dc092 Compare February 6, 2018 17:35
@jbicker jbicker requested a review from svenefftinge February 6, 2018 17:44
@jbicker jbicker force-pushed the git-history branch 2 times, most recently from 9eeef0e to 1fe61cf Compare February 8, 2018 15:40
@jbicker jbicker changed the title [WIP] Git history Git history Feb 8, 2018
@jbicker jbicker force-pushed the git-history branch 2 times, most recently from de79944 to 2d0300d Compare February 9, 2018 08:09
@svenefftinge
Copy link
Contributor

Please check the light theme:
screen shot 2018-02-09 at 10 00 29

@svenefftinge
Copy link
Contributor

  • Commit items should expand/collapse on a single click if selected.
  • Pressing enter on a file should open / reveal but not focus the editor.


import URI from "@theia/core/lib/common/uri";

export namespace GitDiffCommitUri {
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't seem to be used?

repository.localUri, result.stdout.trim()
.split(CommitDetailsParser.COMMIT_CHUNK_DELIMITER)
.filter(item => item && item.length > 0));
} catch (e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This catch is a leftover, I assume. Maybe I left it there. Could you please clean that up?

@jbicker jbicker force-pushed the git-history branch 4 times, most recently from 5548ba6 to 18bf0db Compare February 12, 2018 10:21
@jbicker
Copy link
Contributor Author

jbicker commented Feb 13, 2018

Pressing enter on a file should open / reveal but not focus the editor.

This will be solved with #1242

Copy link
Contributor

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

LGTM

this.singleFileMode = !fileStat.isDirectory;
}
this.addCommits(options);
this.update();
Copy link
Contributor

Choose a reason for hiding this comment

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

this update looks like it should update after addCommits but it doesn't because addCommits is async.

Copy link
Contributor

Choose a reason for hiding this comment

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

but I see it is there to render the loading

Fixed the `git diff` parser issue.
Toggle Widget with alt+h or via view menu
The list gets lazy loaded

Signed-off-by: Jan Bicker <[email protected]>
@jbicker jbicker merged commit c4cadd4 into master Feb 15, 2018
@kittaakos kittaakos deleted the git-history branch February 16, 2018 08:54
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.

3 participants