Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Apr 2021 15:47:12 GMT
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c618b1501762 - main - tindex: Amend last commit a bit.
Message-ID:  <202104081547.138FlCPe050641@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mat:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c618b1501762ea9cd7ef0a3ae44cec7970dfbd5c

commit c618b1501762ea9cd7ef0a3ae44cec7970dfbd5c
Author:     Mathieu Arnold <mat@FreeBSD.org>
AuthorDate: 2021-04-08 15:33:10 +0000
Commit:     Mathieu Arnold <mat@FreeBSD.org>
CommitDate: 2021-04-08 15:46:53 +0000

    tindex: Amend last commit a bit.
    
    When you run `git log foo` foo can be, from git-log(1),
    `[<revision range>] [[--] <path>...]`, so, may things.
    
    - A "revision range" described by gitrevision(7) (don't got there unless
      you have a few hours, or already lost your sanity), which can be :
      * a commit hash,
      * a tag
      * a branch,
      * a ref name
      * a "describe output"
      * and many other ways to describe revisions
      * a range made by any of the above
    - An existing path.
    
    When it can't find any of those, git figures out that you meant
    something else and made a typo, and exits.
    
    If you really meant a path, you have to run `git log -- foo`. Then git
    knows that you meant a path and only a path, it will then assume that
    you knew what you meant, and will go look in the history.
---
 Tools/scripts/tindex | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Tools/scripts/tindex b/Tools/scripts/tindex
index cf8eb8c6ce8e..57a74dd8c23f 100755
--- a/Tools/scripts/tindex
+++ b/Tools/scripts/tindex
@@ -42,11 +42,9 @@ fi
 # --------------------------------------------------------
 
 blame() {
-  # Find out who is responsible for current version of file $1, if not deleted
+  # Find out who is responsible for current version of file $1
 
-  if [ -e $1 ]; then
-    ${GIT} log --no-patch --max-count=1 --format='%ce' $1
-  fi
+  ${GIT} log --no-patch --max-count=1 --format='%ce' -- $1
 }
 
 indexfail() {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104081547.138FlCPe050641>