Feature request: Set git svn options in .git/config file
Hello,
while working with a git-svn repository, I like to use the command line options --use-log-author and --add-author-from for all calls of git svn fetch,
git svn rebase,
git svn dcommit, ...
Doing so consequently, the commit-ids of each git repository, which has been cloned from the same svn-repository match.
Unfortunately, it is possible to forget these options on the command line. (And 2nd, tortoise-git does not surport it, see
https://gitlab.com/tortoisegit/tortoisegit/issues/2824 ).
Therefore I believe, that it would be the best solution to store the settings of --add-author-from, --use-log-author and maybe --authors-prog in the .git/config file.
Greetings
Juergen
Quoted 3 lines · Juergen Kosel
Therefore I believe, that it would be the best solution to store the settings of --add-author-from, --use-log-author and maybe --authors-prog in the .git/config file.
Actually, "svn.authorsProg" is already documented as a config option for --authors-prog.
It's been a while since I looked at this, but in git-svn, all the "--xxx-yyy" command-line options should be available under the appropriate "svn.xxxYyy" config key.
So, can you confirm that svn.addAuthorFrom and svn.useLogAuthor config keys work and can be documented?
Even better would be for you to provide a patch to the documentation :)
Otherwise, I can write one up sometime this week.
Thanks.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Am 05.12.2016 um 23:54 schrieb Eric Wong:
Quoted 2 lines
So, can you confirm that svn.addAuthorFrom and svn.useLogAuthor config keys work and can be documented?
yes, I can confirm, that adding this configuration keys works with git 2.1.4 work.
I have added the config keys as follows:
git config --add --bool svn.useLogAuthor true
git config --add --bool svn.addAuthorFrom true
Quoted 3 lines
Even better would be for you to provide a patch to the documentation :) Otherwise, I can write one up sometime this week.
My English is not that well. So I prefer, if you update the documentation :-)
Greetings
Juergen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Icedove - http://www.enigmail.net/
iD8DBQFYRvRhYZbcPghIM9IRAjtHAJ0QaqbUxcgoPXmidIg9WALXmg1JAQCfTHFj wgPLKXK5Ny0bP/K9vpE9KzY=
=A+Yy
-----END PGP SIGNATURE-----
PATCH 1/1 git-svn: document useLogAuthor and addAuthorFrom config keys
Quoted 10 lines · Juergen Kosel
Am 05.12.2016 um 23:54 schrieb Eric Wong:
Quoted 2 lines
So, can you confirm that svn.addAuthorFrom and svn.useLogAuthor config keys work and can be documented?
yes, I can confirm, that adding this configuration keys works with git 2.1.4 work.
I have added the config keys as follows:git config --add --bool svn.useLogAuthor true
git config --add --bool svn.addAuthorFrom true
Thanks for testing, patch below.
Quoted 5 lines
Quoted 2 lines
Even better would be for you to provide a patch to the documentation :) Otherwise, I can write one up sometime this week.
My English is not that well. So I prefer, if you update the documentation :-)
No problem, my asciidoc is a bit rusty, but I think the formatted result will be fine.
(Btw, list convention here is to reply-to-all;
it prevents vger from being a single-point-of-failure)
-------8<-------
Subject: [PATCH] git-svn: document useLogAuthor and addAuthorFrom config keys
We've always supported these config keys in git-svn, so document them so users won't have to respecify them on every invocation.
--- Documentation/git-svn.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Documentation/git-svn.txt +7 -1
@@ -664,13 +664,19 @@ creating the branch or tag. When retrieving svn commits into Git (as part of 'fetch', 'rebase', or 'dcommit' operations), look for the first `From:` or `Signed-off-by:` line in the log message and use that as the author string. ++ +[verse] +config key: svn.useLogAuthor + --add-author-from:: When committing to svn from Git (as part of 'commit-diff', 'set-tree' or 'dcommit' operations), if the existing log message doesn't already have a `From:` or `Signed-off-by:` line, append a `From:` line based on the Git commit's author string. If you use this, then `--use-log-author` will retrieve a valid author string for all commits. - ++ +[verse] +config key: svn.addAuthorFrom ADVANCED OPTIONS ----------------
Signature · 1 line
EW