Giter VIP home page Giter VIP logo

githistoryvscode's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

githistoryvscode's Issues

History is reversed

When viewing the file history, to diff seems reversed from what I would expect.

It shows
[current file] -> [old version]
which shows how to get the current version back to the version in the specified commit.

I was originally expecting
[old version] -> [current file]
which should show what changes have been made since the previous commit

Remove paging and make git log an on demand loading scrollable list

@Spown wrote

well, I for one look in the log mostly when I need to know what happened for a quite a while ago, since the recent staff is still in my head. My team is rather small, but with larger dev teams it can be both the very recent or old. To name the average number of commits to check would actually be impossible, since sometimes you have 50 a day and sometimes you have 50 a month. The index of a commit and it's age rarely correlate. So with a paged view it is actually very difficult to say where the commit in question lies... especially if you don't see the number of pages.

Additionally I'm often looking into log not for one single commit, but for multiple and I would jump between them to see the development. Again with a paged view this turns into a clickfest. That's why I still have to grab SmartGit and use it's log...

I hope I'm not going too far by suggesting an on-demand populated list. This is similar to the infinite scrolling but with the the total number of items known in advance (if this possible with VSCode ofc.):

  1. make the page height equal to [number of commits]x[height of a commit item] to ensure the vert. scrollbar reflecting the true scale of the log.
  2. put empty [50 | whatever is left]x[height of a commit item] containers inside
  3. show first 50 commits in the first container
  4. only load the next 50 when the user actually scrolls the next container into the visible area

Thus if the page contains 5000 commits if the user clicks the scrollbar somewhere in the middle the bottom of the 49th and the top of the 50th container would get visible and only these would be loaded. the most "difficult part" would be to limit concurrent loads either by queuing them or by chaining them.

View History on Moved File Causes Error

I have a git repo where I initially saved a file under a folder and did a commit. Then, I moved the file up to the root and did another commit.

When right-clicking and attempting to view the history of this file (by selecting Git: View File History > (select older checkin) > Compare against workspace file), I get an error.

In the output log, I get:
fatal: Path 'app.js' exists on disk, but not in '8b9d22275d80e46f12076fefb7c81e82817fd0fb'.

app.js was the file that moved between commits.

I am using 0.0.12.

Inbuilt chromium always uses "en-US"

This is a note to fix the localisation of the details view in the git log html page.

It seems that the inbuilt browser/tabviewer only supports en-US regardless of the locale that vscode is set to.
Even if I pass the locale to the browser via an attribute it doesn't work.
So for example toLocaleString('fr', options); (French locale) will display in en-US locale.

Node however will localise dates and strings correctly.

So as long as we localise the html before sending to the browser we can get consistent language support.

Please add documentation about keyboard shortcut

Hi,

I'm trying to find the right command that I must write in keybindings.json, as follow:
{ "key": "ctrl+alt+g", "command": "view.file.gitHistory" },

Could you please tell me what's the command name and additionnaly update the README?

Thank a lot!

Ability to walk through the file versions

It would be nice if when we compare a file against the previous version we can move between te versions. If possible with all the versions listed an we can pick one version and always compare with the previous.

It would be very useful because you normally want to see in which commit do you make a change, and currently it is very hard because you have to open the versions one by one and compare against the previous.
If we can have the same list of versions that is displayed when we open ask for the file version and below the comparison of versions, this would be very easy to do.
Also because the list of versions of a file that is displayed with the command is usually cut by the available space, so you don't really have the change to read the commit comment.

BUG: fs.appendFile causes overwrites when stdout of git show of commit > temp file

Comparing a previous version to a workspace version the code here runs to create a temporary file for vscode to diff.

https://github.com/DonJayamanne/gitHistoryVSCode/blob/master/src/helpers/historyUtils.ts#L202

Stdout of for example

git show "$CommitSHA/somelargefile.js"

is asynchronously appended from stdout to a tmp file used for the vscode diff.

However for larger files fs.appendFile can be called before the previous fs.appendFile has finished causing the tmp file to be overwritten at random places

I solved it temporarily by using fs.appendFileSync although a queuing strategy might be yield better performance.

Git: View History (git log) - getting error with missing file

When tried to show new functionality of "Git Log" (with command as on first screenshot) then getting error with missing file (second screenshot).

Using MS Visual Code 1.4.0 and Git History (git log) plugin v. 0.0.9.

screenshot 2016-08-16 13 23 09

screenshot 2016-08-16 13 23 24

Thanks for help or fix.
J.

Compile error in proxy.ts - error TS2304: Cannot find name 'Clipboard'.`

  • VSCode Version:1.7.1
  • OS Version:Windows 7 sp1

Steps to Reproduce:

  1. Clone repo
  2. npm install (npm version 3.10.8)
  3. F5 to compile (tsc 1.0.3.0)

gives
src/browser/proxy.ts(33,25): error TS2304: Cannot find name 'Clipboard'.

It all runs as normal so I guess its just a typing issue.

looking at the npm install tree it seems the type definitions for clipboard are in
.\node_modules\@types\clipboard\index.d.ts

If I add

import * as Clipboard from 'clipboard';

at the top of proxy.ts

compile succeeds.

I am a newbie to typescript so I may be missing something.

If this is indeed a fix I can create a PR.
Let me know.

GitLog not responding

@gjstockham

've done a complete re-install of VS Code. Without the icons extension, I don't get the admin prompt, but I still get nothing from git history. It looks like it is hanging.

Do not use on('exit') to read completed data streams

There are a few places where ls.on('exit... is used to read the results of a ls.stdout.on.('data'... stream.

This is wrong. I was surprised too.

From the node docs

The 'exit' event is emitted after the child process ends. If the process exited, code is the final exit code of the process, otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null. One of the two will always be non-null.

Note that when the 'exit' event is triggered, child process stdio streams might still be open.

e.g. here

https://github.com/DonJayamanne/gitHistoryVSCode/blob/master/src/helpers/gitHistory.ts#L61

I observed some subtle bugs where on exit is fired before data stream has been flushed.
Incomplete history list and git log are undesirable results I experienced and behaviour can be different dependant on cpu and machine load so this is definitely one to fix.

We need to review the code and use on close or on end to guarantee completion of stream.

Ability to edit current version

When comparing a previous version with current one, it would be great to be be able to actually edit the current version, just like VSCode natively offers the ability to edit when comparing against un/staged version.

PS: Awesome Extension!

Commits show multiple times

In the File History selection box (when you are choosing old versions to compare against) some of the commits are duplicated.

git log - better zoom support

The commit hash gets cut off whenever I try to view the git history. This has been the case in both Ubuntu 14.04 and Ubuntu 16.04.

It does this regardless of window size, though when I shrink the window I can see a little bit more of the blue button.

git log

Restart as admin on 1.5.1

Referencing issue microsoft/vscode#11739

On the latest update to VS Code, I get prompted to restart VS Code as admin to use git history, even when I am already running as administrator. I haven't managed to get it to work at all.

VS Code 1.5.1, Windows 10, Git History 0.0.10

Keyboard shortcut for View file history throws an error

I just updated to v 0.0.7, and git.viewFileHistory stopped working -- when called from a keyboard shortcut.

Opening the command prompt (ctrl+shift+p) and running "Git: view file history" from there works correctly. On the other hand, pressing its keyboard shortcut ("ctrl+h" in my case, defined as { "key": "ctrl+h", "command": "git.viewFileHistory" }) triggers an error, with the text "fatal: Not a git repository (or any of the parent directories): .git" in the output console.

Everything was working fine prior to the extension upgrade, and I don't have problems with any other keyboard shortcuts. git.viewLineHistory works fine, both with and without a keyboard shortcut. I'm not sure what version of the extension I was on before, but it was at least 0.0.5. VSCode is at 1.3.1 and I'm running on Debian stretch.

git log cant diff deleted files

If a file was deleted in a commit there is no local file in the workspace to diff.
This gives an error when clicking on the link,

no workspace file

git log limited by days or commits count

Can you add argument to "git log" to get log of last N days or of last N commits? If it will speedup opening the log :)

For example:
git log 5 days
git log 5 commits

thank you.

Styling for individual file history details

The individual file history details feature is very useful, thank you - I was looking forward for that for some time. The dark blue color of the links is not very appealing though. Can you please change it to the standard color scheme in VS Code? I think the "standard" blue is #3769A6. This is how it looks like:

link

Thanks

Error accessing git repo

I am getting a 'Not a git repository' error when getFileHistory() is executed. It seems to be happening because git rev-parse --git-dir in getGitRepositoryPath() returns a relative path if the file is at the same level as the .git directory.

I added this before the resolve() in getGitRepositoryPath() and it works as expected:

if (path.dirname(log) === '.') {
   log = path.dirname(fileName) + '/' + log;
}

Without the change, it works fine on files in subdirectories (when the git command returns an absolute path). I'm running on Windows.

Increase performance of git log on windows

Currently we do this

git log --format="%n95E9659B-27DC-43C4-A717-D75969757EA5%nrefs=%ncommit=%H%ncommitAbbrev=%h%ntree=%T%ntreeAbbrev=%t%nparents=%P%nparentsAbbrev=%p%nauthor=%an <%ae> %at%ncommitter=%cn <%ce> %ct%nsubject=%nbody=%b%n%nnotes=%N%n95E9659B-27DC-43C4-A717-D75969757EA1%n" --date-order --decorate=full --skip=0 --max-count=500 --numstat --

and use nodejs spawn and stdout.on('data' to read the result.

I ran some basic benchmarks and this takes 6 seconds on my install of windows 7 for around 100 commits at the command line.
Obviously it takes a bit longer to parse these entries but in the main it is the stdout that is slow.

git on windows seems to be the worst performer.
git on OSX has good performance.
git on Fedora 25 good performance.

If you examine the result of the above command you will see we are preloading a lot of stuff we will never likely use.

We should load only what we need to display the git graph and then think about loading the other bits on demand async whatever to get a better UX.

Wrong history by line (Visual Studio Code 1.7.1 / windows 10)

Example
I have 2 lines

aaaaaa (edited 1 month ago)
bbbbb (edited 2 month ago)

If I insert new row:
aaaaaa (edited 1 month ago)
NEW LINE (edited 2 month ago) ERROR
bbbbb ( no info??? ) ERROR

I just enter new row, without commit.
Need shift info by rows, if inserted new rows.

Move getGitRepositoryPath getGitPath to activate

This is a work item to track moving

getGitPath
getGitRepositoryPath

to the activate event

... as these only need to be actioned once per extension session.
Currently these functions are run on every git command which seems unnecessary.
This should help performance especially on windows where we query the registry for git location on every git command.

new feature request: open diff by click path of file when view single commit in commits list

I used to be a Webstorm user. The Git extension in Webstorm has a feature that allows the user to view all the modified files for a single commit _(your extension already has this feature)_. In addition, users can also view git diff for each modified file in side by side mode by click the path of files. I hope you can consider adding this feature to the extension.(My English is poor.Sorry for the grammer mistake)

gitHistory tmp- files in my Linux tmp directory appearing in my vscode linting list

Hello,

I just installed the add-on, had a look at the git file history of a few commits and then found all these tmp- files in my tmp dir. They are for some reason being brought up in my linting dialogue which is not good news.

When I restart vscode they are gone, but i don't want to have to do that every time i look at a git history. It does not matter if the files are open or not, they still show up.

Please see the attached screen shot, is this a bug or can I change a setting? THANKS.

PS I am using Fedora Linux (which is working 100% perfectly for vscode :)
screenshot from 2016-09-06 16-12-17

Code style for if else try catch

I see both examples in the code which should I use?
There is a tslint rule for no 1. (presumably because its defacto) so that's easier to enforce but coming from c# I tend to the later.

  1. (we can enforce this).
if (some condition) {
    dosomething;
} else {
    dosomethingelse;
}

try {
    dosomething;
} catch {
    some error;
}

or

  1. (next-line rule doesn't exist yet in tslint)
if (some condition) {
    dosomething;
} 
else {
    dosomethingelse;
}

try {
    dosomething;
} 
catch {
    some error;
}

History detail color

Hi, I find it hard to look at the (blue) color of file in the history file:

githistory

Can we change the color so that it is readable?

Add support for `git log --follow`

As a user, I want to be able to ensure git log is called with the --followoption, so that when I rename/move files I will still see the full git history for those files.

Usage is complicated

Hey I like gitHistory a lot!

But I have to

press F1
type Git
select Git: View History
select either Line or File

which is rather inconvenient...

gitBlame plugin just displays a line in the footer ... this is very nice, but insufficient.

I wonder if there is something inbetween?
I would love to have a small status in the footer, with two buttons for file and line history.

Or at least instructions for a keyboard shortcut

git.path config setting causes endless loop

Command just seems to put the tab into a long loop, and does not create the history graph.

Is there a version of Git that I need to install?

I am working on Windows and my development is on a shared drive.

Cant find commandId for shortcut

Hi and thank you for your extension.

I'm trying to find what are the commandIds for Git : View File History Git : View Line History

Could you please complete the following json snippet :) ?

// Git
{
        "key": "ctrl+alt+g",
        "command": "workbench.view.git.???",
    }

Thanks and kind regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.