-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Git history #1176
Conversation
packages/git/src/node/dugite-git.ts
Outdated
} | ||
if (options) { | ||
const range = this.mapRange(options.range); | ||
args.push(...[range, '-C', '-M', '-m']); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, should be separated.
packages/git/src/node/dugite-git.ts
Outdated
} | ||
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); |
There was a problem hiding this comment.
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.
aade41c
to
e687371
Compare
c025401
to
fab622e
Compare
245afd7
to
50dc092
Compare
9eeef0e
to
1fe61cf
Compare
de79944
to
2d0300d
Compare
|
|
||
import URI from "@theia/core/lib/common/uri"; | ||
|
||
export namespace GitDiffCommitUri { |
There was a problem hiding this comment.
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?
packages/git/src/node/dugite-git.ts
Outdated
repository.localUri, result.stdout.trim() | ||
.split(CommitDetailsParser.COMMIT_CHUNK_DELIMITER) | ||
.filter(item => item && item.length > 0)); | ||
} catch (e) { |
There was a problem hiding this comment.
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?
5548ba6
to
18bf0db
Compare
This will be solved with #1242 |
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]>
Open Git History from File Navigator for certain folder:
...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:
...or open it from View Menu or toggle with [ALT]-h:
Navigate as you know it from the File Navigator with Arrow-Keys and open files with ENTER:
The History-List gets loaded lazy (after [GIT_HISTORY_MAX_COUNT] elements):