threads / discuss / 44624

Feature request: Set git svn options in .git/config file

Subject: Feature request: Set git svn options in .git/config file

## tl;dr

4 messages between Dec 5, 2016 and Dec 11, 2016.

replies: 3people: 2as markdown or json

Juergen Kosel· Dec 5, 2016, 17:34 UTC · lore
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
Eric Wong· Dec 5, 2016, 22:54 UTC · re: Juergen Kosel · lore

Re: Feature request: Set git svn options in .git/config file

Juergen Kosel <juergen.kosel@gmx.de> wrote:
> 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.
Juergen Kosel· Dec 6, 2016, 17:24 UTC · re: Eric Wong · lore

Re: Re: Feature request: Set git svn options in .git/config file

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Am 05.12.2016 um 23:54 schrieb Eric Wong:
> 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

> 
> 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-----

Eric Wong· Dec 11, 2016, 00:06 UTC · re: Juergen Kosel · lore

[PATCH] git-svn: document useLogAuthor and addAuthorFrom config keys

Juergen Kosel <juergen.kosel@gmx.de> wrote:
Show 10 quoted lines
> Am 05.12.2016 um 23:54 schrieb Eric Wong:
> > 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.
Show 5 quoted 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.

Reported-by: Juergen Kosel <juergen.kosel@gmx.de>
Signed-off-by: Eric Wong <e@80x24.org>
---
 Documentation/git-svn.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 5f9e65b0c..9bee9b0c4 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -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
 ----------------
-- 
EW

← back to recent threads