emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to properly attribute authorship with Git (was Re: [PATCH] lisp/


From: Matt
Subject: Re: How to properly attribute authorship with Git (was Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name)
Date: Sun, 17 Mar 2024 14:42:29 +0100
User-agent: Zoho Mail

 ---- On Sun, 17 Mar 2024 11:31:00 +0100  Ihor Radchenko  wrote --- 
 > Matt matt@excalamus.com> writes:
 >
 > > First, would you like me to update the commit?  If so, I will need 
 > > guidance.  The correct procedure to change the author after committing to 
 > > remote is unclear to me.  I would think it's something like sync my local 
 > > copy with the latest remote version, update the author locally, and force 
 > > push the change.  I would then expect that the next time someone pulls, it 
 > > would update their local with the author change.  It would, however, cause 
 > > a conflict, I think, for someone in the middle of making a change who has 
 > > not synced with the forced push version and is trying to push their change.
 > 
 > We should avoid force pushing unless something is terribly broken.
 > What you may do instead is (1) revert the commit; (2) re-apply the
 > commit version with the correct author attribution.

Done.

For the benefit of future me or anyone else who cares, I did:

1. git revert <hash-for-specific-commit-needing-modification>
2. make changes (e.g. emacs <file-needing-modification> followed by 
*type-type-type* or some incantation of 'git apply' or 'git am')
3. git commit --author "Arthur Author <arthur-author's-email>"
4. git push

'git revert', in this case, basically swaps the plus and minus signs in the 
diff for the specified commit and submits that as a new set of changes.  After 
applying those changes, it's possible, in this case, to proceed with "what you 
should have done in the first place".

 > > Second, I can update Worg with an explanation that it's important to 
 > > credit authors using git's author field and how to do this.  Unless I 
 > > missed it, worg/org-contribute makes no mention of the author field.  The 
 > > version of git packaged by my distro is 2.41.0 and, AFAICT, has no -A flag 
 > > for 'git' or 'git commit'.  However, the following works on my machine 
 > > and, I guess, is the long option form:
 > >
 > >     git commit --author "Arthur Override "
 > 
 > You are right. Looks like -A is just Magit shortcut.
 > 
 > As for crediting authors, we may document it in 
 > https://orgmode.org/worg/org-maintenance.html#copyright
 > Although, it is under "core maintainer" section. Maybe we can make a
 > dedicated section for maintainers on how to deal with patch submissions.

I added a little section within copyright: 
https://git.sr.ht/~bzg/worg/commit/80152bee771b755aedfbe488497c5e4d0e7457c2

--
Matt Trzcinski
Emacs Org contributor (ob-shell)
Learn more about Org mode at https://orgmode.org
Support Org development at https://liberapay.com/org-mode





reply via email to

[Prev in Thread] Current Thread [Next in Thread]