From 18d5453ed36331b3f4123afae6c1c6bb4ef4d0a5 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 9 Nov 2006 10:44:56 -0800 Subject: [PATCH 1/2] Documentation: move blame examples This moves the example to specify a line range with regexps to a later part of the manual page that has similar examples. Signed-off-by: Junio C Hamano --- Documentation/git-blame.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt index ff54d29d70..bdfc666928 100644 --- a/Documentation/git-blame.txt +++ b/Documentation/git-blame.txt @@ -41,10 +41,7 @@ OPTIONS Use the same output mode as gitlink:git-annotate[1] (Default: off). -L n,m:: - Annotate only the specified line range (lines count from - 1). The range can be specified with a regexp. For - example, `-L '/^sub esc_html /,/^}$/'` limits the - annotation only to the body of `esc_html` subroutine. + Annotate only the specified line range (lines count from 1). -l, --long:: Show long rev (Default: off). @@ -125,6 +122,12 @@ ll. 40-60 for file `foo`, you can use `-L` option like this: git blame -L 40,60 foo +Also you can use regular expression to specify the line range. + + git blame -L '/^sub hello {/,/^}$/' foo + +would limit the annotation to the body of `hello` subroutine. + When you are not interested in changes older than the version v2.6.18, or changes older than 3 weeks, you can use revision range specifiers similar to `git-rev-list`: From a6ec3c1599f990b4f2f3dab2606688639f74d844 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Tue, 3 Oct 2006 17:29:26 +0100 Subject: [PATCH 2/2] git-rebase: Use --ignore-if-in-upstream option when executing git-format-patch. This reduces the number of conflicts when rebasing after a series of patches to the same piece of code is committed upstream. Signed-off-by: Robert Shearman Signed-off-by: Junio C Hamano --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase.sh b/git-rebase.sh index a7373c0532..413636e208 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -286,7 +286,7 @@ fi if test -z "$do_merge" then - git-format-patch -k --stdout --full-index "$upstream"..ORIG_HEAD | + git-format-patch -k --stdout --full-index --ignore-if-in-upstream "$upstream"..ORIG_HEAD | git am --binary -3 -k --resolvemsg="$RESOLVEMSG" \ --reflog-action=rebase exit $?