Comments (12)
There is no way to do this via a config value, but you could add it to the line here possibly
eval "git log --follow $graph --color=always --format='$log_format' $* $_forgit_emojify" |
We could consider adding it as an option in the future, like we do for --graph
if enough people think it would be useful
from forgit.
Does glo --follow -- FILESPEC
not work? Forgit passes the options on to git log with $*
. Or am I missing something here?
from forgit.
Interesting, maybe true! We use the argv variable $*
a couple times in the function
files=$(sed -nE 's/.* -- (.*)/\1/p' <<< "$*") # extract files parameters for `git show` command
eval "git log $graph --color=always --format='$log_format' $* $_forgit_emojify" |
I'm not sure if the first one would choke on that flag? It's worth a try though @Clumsy-Coder . Do report back if you find out :)
from forgit.
I tried the command to display the entire history of a file.
glo --follow <file>
I got this.
Not sure what the ...
thing is. When using the arrow keys to navigate the commits, ...
display nothing on the right side
from forgit.
That's git telling you that it left out some commits because the file you specified wasn't modified in those. We could make sure that only lines actually containing a commit get displayed by adding a grep command like this
eval "git log $graph --color=always --format='$log_format' $* $_forgit_emojify" |
grep '\*' |
FZF_DEFAULT_OPTS="$opts" fzf
This would also get rid of lines containing only things like |/
. Before the change glo
looks like this
After the change like this:
I'd personally prefer the second one and can provide a PR if this is the behavior we want. Opinions?
from forgit.
Interesting, maybe true! We use the argv variable
$*
a couple times in the functionfiles=$(sed -nE 's/.* -- (.*)/\1/p' <<< "$*") # extract files parameters for `git show` command eval "git log $graph --color=always --format='$log_format' $* $_forgit_emojify" |
I'm not sure if the first one would choke on that flag? It's worth a try though @Clumsy-Coder . Do report back if you find out :)
Should be fine. The sed command only matches when there is a space after the --
.
from forgit.
@Clumsy-Coder Do I understand it right that calling glo --follow <file>
actually answers your question?
from forgit.
That's git telling you that it left out some commits because the file you specified wasn't modified in those. We could make sure that only lines actually containing a commit get displayed by adding a grep command like this
eval "git log $graph --color=always --format='$log_format' $* $_forgit_emojify" | grep '\*' | FZF_DEFAULT_OPTS="$opts" fzfThis would also get rid of lines containing only things like
|/
. Before the changeglo
looks like thisAfter the change like this:
I'd personally prefer the second one and can provide a PR if this is the behavior we want. Opinions?
@sandr01d I personally prefer the first one and would like to keep this information in the log. So if you want to provide a PR for this, I would prefer to have it as an opt-in option.
from forgit.
@carlfriedrich It mostly solves it, but a small issue remains where you have ...
on commits that are not related to the file being viewed.
from forgit.
@carlfriedrich It mostly solves it, but a small issue remains where you have
...
on commits that are not related to the file being viewed.
Does FORGIT_LOG_GRAPH_ENABLE=false glo --follow FILESPEC
provide your desired output?
from forgit.
That's git telling you that it left out some commits because the file you specified wasn't modified in those. We could make sure that only lines actually containing a commit get displayed by adding a grep command like this
eval "git log $graph --color=always --format='$log_format' $* $_forgit_emojify" | grep '\*' | FZF_DEFAULT_OPTS="$opts" fzfThis would also get rid of lines containing only things like
|/
. Before the changeglo
looks like this
After the change like this:
I'd personally prefer the second one and can provide a PR if this is the behavior we want. Opinions?@sandr01d I personally prefer the first one and would like to keep this information in the log. So if you want to provide a PR for this, I would prefer to have it as an opt-in option.
Found this to be solved by FORGIT_LOG_GRAPH_ENABLE
already, so no additional changes are necessary.
from forgit.
Does FORGIT_LOG_GRAPH_ENABLE=false glo --follow FILESPEC provide your desired output?
@sandr01d
This solves the issue. maybe sometime later I could use it with the graph as well.
from forgit.
Related Issues (20)
- Backwards compatibility check does not check for declare or export
- Discussion: keybindings to support more functions? HOT 17
- Untracked files with spaces in the path do not show a preview with ga HOT 5
- Should `gcp` only show commits that are valid to pick? HOT 4
- zplug: forgit is not available HOT 3
- Error while trying to run forgit commands in Linux HOT 4
- apperance truncated HOT 9
- Fisher install doesn't work (probably due to the symlink to the main git-forgit script) HOT 3
- forgit-git not found when trying to use forgit on fish when installed via the AUR HOT 3
- [feature request] forgitgcm git commit message HOT 3
- scmpuff/scmbreeze file number shortcuts no longer work HOT 8
- Git
- [feature request] copy git stash ID on ctrl+y HOT 3
- Forgit interactive not work on alacritty + tmux HOT 2
- Detection of unexported variables is incorrect in fish if the variable has an empty string value
- Feature Request: GCB autocomplete for zsh HOT 1
- Question: direction of tab HOT 9
- grc giving back error "git branch: command not found" HOT 11
- `forgit` does not open in a tmux popup window if fzf tmux options are set
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forgit.