git-heatmap | : bar_chart : Display a heatmap for oft-edited files | Data Visualization library
kandi X-RAY | git-heatmap Summary
kandi X-RAY | git-heatmap Summary
:bar_chart: Display a heatmap for oft-edited files
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of git-heatmap
git-heatmap Key Features
git-heatmap Examples and Code Snippets
Community Discussions
Trending Discussions on git-heatmap
QUESTION
git log --name-status --pretty=format: | sed '/^$/d' | cut --fields=2- | sort | uniq --count | sort --numeric-sort --reverse | head
prints the 10 most edited files in a Git repo (based on this). I want to create a Git alias most-edited
for this command with one caveat: the command should put any extra arguments into the git log
command. This would allow me to run git most-edited 'foo bar/' baz/
to get the most edited files in the foo bar
(note the space) and baz
directories.
In a script this would be as simple as adding -- "$@"
to the git log
command. However, if I create an alias most-edited = !git log --name-status --pretty=format: -- "$@" | sed '/^$/d' | cut --fields=2- | sort | uniq --count | sort --numeric-sort --reverse | head
the arguments are instead passed to the last command in the pipeline, head
. Is there some way to pass the arguments to git log
?
ANSWER
Answered 2021-Sep-26 at 01:16In the alias, define a function followed by an immediate call to the function. When the alias is expanded, any additional arguments on the command line become arguments to that function.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install git-heatmap
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page