Hi Everyone

I am thinking about changing the behavior and/or available options for
hijacking patches.

Context: When working from home I have two identities in my
~/.darcs/author file: one with my work email address and one with my
private email address. I want to decide which one to use per repo, once.
This works fine with the record command: darcs remembers the chosen
identity in _darcs/prefs/author and does not ask me again (for this
repo). But it does not work this way with amend or rebase i.e. when
(potentially) hijacking patches.

As I see it, there are basically three options that make sense:

(a) keep the original author
(b) change the author as specified via command line
(c) behave similar to 'darcs record':
    * change the author to the default author
      (either _darcs/prefs/author or else ~/.darcs/author)
    * if there is no default author, prompt the user to specify one
    * if there are multiple authors, prompt the user to select one
    * in each case, remember the choice in the repo

Currently (a) is the default behavior and (b) can be chosen by passing
--author <author>. (c) is not implemented; instead we have
--select-author which does not remember the choice and does not check if
we have already made a choice (for this repo). IMO this is not very
useful. I guess it is quite uncommon that a user wants to edit a patch
with an author that is different from both the original author and her
chosen default identity for the project; in this uncommon case it would
be okay to require the user to specify the identity explicitly using
--author.

Thus, I propose we change --select-author in such a way that it behaves
as option (c) above.

This change is not 100% compatible, so I'd like to have feedback on
whether you think this would hurt.

A more disruptive but ultimately more consistent alternative would be to
make option (c) the default behavior, and require an explicit command
line switch --keep-author to get behavior (a), similar to the existing
--keep-date option. The --select-author option could then be used to
override a previous --author or --keep-author in case a user has set one
of these options in their ~/.darcs/defaults.

Cheers
Ben

_______________________________________________
darcs-users mailing list
darcs-users@osuosl.org
https://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to