From 0b7921c8d5218068ebebb2a189b45294091e98c3 Mon Sep 17 00:00:00 2001 From: Nicolas Zachow Date: Wed, 17 Oct 2018 23:07:16 -0300 Subject: [PATCH 1/2] I want to view the evolution of a function --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index b83da7f..ecbc536 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ For clarity's sake all examples in this document use a customized bash prompt in - [I want to find a string in any commit](#i-want-to-find-a-string-in-any-commit) - [I want to find by author/committer](#i-want-to-find-by-authorcommitter) - [I want to list commits containing specific files](#i-want-to-list-commits-containing-specific-files) + - [I want to view the commit history for a specific function](#i-want-to-view-the-commit-history-for-a-specific-function) - [Find a tag where a commit is referenced](#find-a-tag-where-a-commit-is-referenced) - [Submodules](#submodules) - [Clone all submodules](#clone-all-submodules) @@ -1231,6 +1232,17 @@ While using wildcards, it's useful to inform `--name-status` to see the list of $ git log --name-status -- **/*.js ``` + +### I want to view the commit history for a specific function + +To trace the evolution of a single function you can use: + +```sh +$ git log -L :FunctionName:FilePath +``` + +Note that you can combine this with further `git log` options, like [revision ranges](https://git-scm.com/docs/gitrevisions) and [commit limits](https://git-scm.com/docs/git-log/#_commit_limiting) + ### Find a tag where a commit is referenced To find all tags containing a specific commit: From ee10f433266b476db8d660aa44892a089c646429 Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Thu, 29 Nov 2018 14:17:35 -0500 Subject: [PATCH 2/2] Adding a period. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ecbc536..9101fea 100644 --- a/README.md +++ b/README.md @@ -1241,7 +1241,7 @@ To trace the evolution of a single function you can use: $ git log -L :FunctionName:FilePath ``` -Note that you can combine this with further `git log` options, like [revision ranges](https://git-scm.com/docs/gitrevisions) and [commit limits](https://git-scm.com/docs/git-log/#_commit_limiting) +Note that you can combine this with further `git log` options, like [revision ranges](https://git-scm.com/docs/gitrevisions) and [commit limits](https://git-scm.com/docs/git-log/#_commit_limiting). ### Find a tag where a commit is referenced