Skip to content

Commit

Permalink
Add helper script snippet for following renames
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoettle committed Jan 28, 2025
1 parent 7a3a7c1 commit 4f91733
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,4 @@ Contributors
- Skyler Grey <[email protected]>
- Emil Velikov <[email protected]>
- Linnea Gräf <[email protected]>
- Matthias Schoettle <[email protected]>
16 changes: 16 additions & 0 deletions docs/scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ This output is convenient for use in larger scripts.
.. SPDX-SnippetEnd
Year of first commit while following renames
====================

If you want to follow file renames in the Git history, you can use the `--follow` argument.
This requires you to pass the file to `git log`.

.. SPDX-SnippetBegin
.. SPDX-Snippet-License-Identifier: CC0-1.0
.. code-block:: console
$ git log --follow --date="format:%Y" --format="format:%cd" -- docs/scripts.rst | tail -n 1
2022
.. SPDX-SnippetEnd
*******
Authors
*******
Expand Down

0 comments on commit 4f91733

Please sign in to comment.