Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper script snippet for following renames #1135

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,4 @@ Contributors
- Emil Velikov <[email protected]>
- Linnea Gräf <[email protected]>
- Raphael Schlarb <[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