git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Feature request: Set git svn options in .git/config file
@ 2016-12-05 17:34 Juergen Kosel
  2016-12-05 22:54 ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Juergen Kosel @ 2016-12-05 17:34 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Feature request: Set git svn options in .git/config file
  2016-12-05 17:34 Feature request: Set git svn options in .git/config file Juergen Kosel
@ 2016-12-05 22:54 ` Eric Wong
  2016-12-06 17:24   ` Juergen Kosel
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Wong @ 2016-12-05 22:54 UTC (permalink / raw)
  To: Juergen Kosel; +Cc: git

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: Feature request: Set git svn options in .git/config file
  2016-12-05 22:54 ` Eric Wong
@ 2016-12-06 17:24   ` Juergen Kosel
  2016-12-11  0:06     ` [PATCH] git-svn: document useLogAuthor and addAuthorFrom config keys Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Juergen Kosel @ 2016-12-06 17:24 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] git-svn: document useLogAuthor and addAuthorFrom config keys
  2016-12-06 17:24   ` Juergen Kosel
@ 2016-12-11  0:06     ` Eric Wong
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2016-12-11  0:06 UTC (permalink / raw)
  To: Juergen Kosel; +Cc: git

Juergen Kosel <juergen.kosel@gmx.de> wrote:
> 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.

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-11  0:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-05 17:34 Feature request: Set git svn options in .git/config file Juergen Kosel
2016-12-05 22:54 ` Eric Wong
2016-12-06 17:24   ` Juergen Kosel
2016-12-11  0:06     ` [PATCH] git-svn: document useLogAuthor and addAuthorFrom config keys Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).