-
Notifications
You must be signed in to change notification settings - Fork 214
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
add gig --empty-dir
#762
add gig --empty-dir
#762
Conversation
upgrade nvdc for neovide
modules/git/git-v2.nu
Outdated
@@ -566,10 +575,9 @@ export def _git_log [v num] { | |||
_git_log_stat $num | |||
} else { {} } | |||
let r = do -i { | |||
git log --reverse -n $num --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD»¦«%D | |||
git log --reverse -n $num --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD |
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.
Is there a reason you're reversing this change? #757
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.
─#─┬──────refs───────
0 │[list 0 items]
1 │[list 0 items]
2 │[list 0 items]
3 │[list 0 items]
4 │[list 0 items]
5 │[list 0 items]
6 │[list 0 items]
7 │[list 0 items]
8 │[list 0 items]
9 │[list 0 items]
10 │[list 0 items]
11 │[list 0 items]
12 │[list 0 items]
13 │[list 0 items]
14 │[list 0 items]
15 │[list 0 items]
16 │[list 0 items]
17 │[list 0 items]
18 │[list 0 items]
19 │[list 0 items]
20 │[list 0 items]
21 │[list 0 items]
22 │[list 0 items]
23 │[list 0 items]
24 │[list 0 items]
25 │[list 0 items]
26 │[list 0 items]
27 │[list 0 items]
28 │[list 0 items]
29 │[list 0 items]
30 │[list 0 items]
31 │──┬─────────────
│0 │HEAD -> main
│1 │origin/main
│2 │origin/HEAD
│──┴─────────────
─#─┴──────refs───────
- This column is mostly empty,
So it should be global information rather than belonging to a specific log entry? - The information displayed by
refs
is not very intuitive. - Under normal circumstances, the branch will be displayed in the prompt.
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.
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.
Sorry, I found that my understanding was wrong, refs are indeed necessary. But it is hints information and does not need to be processed (this will have a relatively small impact on performance)
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 didn't find this modification was submitted by @dam4rus before, let me take a look again
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.
After a simple test, if refs are parsed, the speed will slow down from 33ms 192µs 16ns
to 403ms 100µs 853ns
The refs, as a prompt information, does not seem to need to be parsed?
And after parsing, it often needs to be displayed in multiple lines, which is not neat.
Are there any specific scenarios for parsing refs? Can they be parsed during use? @dam4rus
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 added refs to the output to be consistent with git log
, which shows you the refs for each commit. It can be useful information when you are on a feature branch or fork to check whether you have rebased or not. Gonna be honest, I have not benchmarked my change so maybe there is a more optimal way to parse refs. If people do not find this information useful we can add a flag or show only when the verbose flag is present.
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.
It seems that without using the where
statement, there is almost no impact on performance.
Since we already had the verbose
flag before, it's OK to always parse refs.
The final problem is that it raises the line and attracts too much attention.
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.
It seems that without using the where statement, there is almost no impact on performance.
That seems strange. Maybe it would worth digging into this.
The final problem is that it raises the line and attracts too much attention.
Well, the user can just reject the refs
field to filter them out. E.g. I do not really care about the author, email and date of the commit every time, so I have my own alias to reject them
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.
ok, this is acceptable and can be merged.
67954a0
to
16dde29
Compare
ok, i'll land this now. however, i noticed your nvim changes reference neovide which isn't quite the same as nvim. i'm wondering if neovide items need to be in a separate file? |
I found that there is only one method nvdc that references neovide, and it seems unnecessary to put it in a separate file. |
we can leave it for now but at some point we may want to separate since neovide is not nvim. |
The way I think about it is to use a unified nvc to start the neovim client, and then have a flag
I have opened a new PR, merge nvdc into nvc #764 |
upgrade nvdc for neovide