Why Nostr? What is Njump?
2023-11-26 16:34:41

David Whetstone on Nostr: Ever wish you could see the history for just a single #Swift function in #git? You ...

Ever wish you could see the history for just a single #Swift function in #git? You can use:

git log -L :function:file

But git doesn’t know how to find Swift functions by default. You can help it by following these instructions to add “Better diff hunk headers with Swift”: https://juripakaste.fi/swift-git-attributes/

Then the following example would show you all the changes to the login function in APIClient.swift:

git log -L :login:APIClient.swift
Author Public Key
npub1jfe6hf3dw5llk3vaccgv56fz6u63wwxf7l5256h0dredrva50z6q8c2fyq