<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/credential, branch v2.26.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-12-20T20:40:52Z</updated>
<entry>
<title>contrib/credential/netrc: work outside a repo</title>
<updated>2019-12-20T20:40:52Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-12-20T18:45:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6579d93a9789448c54203939650ca24409635f80'/>
<id>urn:sha1:6579d93a9789448c54203939650ca24409635f80</id>
<content type='text'>
Currently, git-credential-netrc does not work outside of a git
repository. It fails with the following error:

	fatal: Not a git repository: . at /usr/share/perl5/Git.pm line 214.

There is no real reason why need to be within a repository, though.
Credential helpers should be able to work just fine outside the
repository as well.

Call the non-self version of config() so that git-credential-netrc no
longer needs to be run within a repository.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>contrib/credential/netrc: make PERL_PATH configurable</title>
<updated>2019-12-20T20:40:50Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-12-20T18:45:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c78c78d2513eaf22105c87484c65b4eecdf0bfc'/>
<id>urn:sha1:1c78c78d2513eaf22105c87484c65b4eecdf0bfc</id>
<content type='text'>
The shebang path for the Perl interpreter in git-credential-netrc was
hardcoded. However, some users may have it located at a different
location and thus, would have had to manually edit the script.

Add a .perl prefix to the script to denote it as a template and ignore
the generated version. Augment the Makefile so that it generates
git-credential-netrc from git-credential-netrc.perl, just like other
Perl scripts.

The Makefile recipes were shamelessly stolen from
contrib/mw-to-git/Makefile.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: load system libraries the recommended way</title>
<updated>2018-10-24T05:48:00Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-10-23T10:51:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c6f050a4349339f812cdc3131ce104057424f492'/>
<id>urn:sha1:c6f050a4349339f812cdc3131ce104057424f492</id>
<content type='text'>
When we access IPv6-related functions, we load the corresponding system
library using the `LoadLibrary()` function, which is not the recommended
way to load system libraries.

In practice, it does not make a difference: the `ws2_32.dll` library
containing the IPv6 functions is already loaded into memory, so
LoadLibrary() simply reuses the already-loaded library.

Still, recommended way is recommended way, so let's use that instead.

While at it, also adjust the code in contrib/ that loads system libraries.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-credential-netrc: make "all" default target of Makefile</title>
<updated>2018-06-18T21:58:59Z</updated>
<author>
<name>Todd Zullinger</name>
<email>tmz@pobox.com</email>
</author>
<published>2018-06-13T03:10:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=04542b6012a48ddbc45f1dc13fb189ae3946a130'/>
<id>urn:sha1:04542b6012a48ddbc45f1dc13fb189ae3946a130</id>
<content type='text'>
Running "make" in contrib/credential/netrc should run the "all" target
rather than the "test" target.  Add an empty "all::" target like most of
our other Makefiles.

Signed-off-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-credential-netrc: fix exit status when tests fail</title>
<updated>2018-06-18T15:44:41Z</updated>
<author>
<name>Luis Marsano</name>
<email>luis.marsano@gmail.com</email>
</author>
<published>2018-06-13T03:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9347166d5d4a07d20e32f45b92435bb788425f1e'/>
<id>urn:sha1:9347166d5d4a07d20e32f45b92435bb788425f1e</id>
<content type='text'>
Signed-off-by: Luis Marsano &lt;luis.marsano@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-credential-netrc: use in-tree Git.pm for tests</title>
<updated>2018-06-18T15:44:33Z</updated>
<author>
<name>Luis Marsano</name>
<email>luis.marsano@gmail.com</email>
</author>
<published>2018-06-13T03:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=04f673d7e47ba8aa413a47038abfc76b16d6c23b'/>
<id>urn:sha1:04f673d7e47ba8aa413a47038abfc76b16d6c23b</id>
<content type='text'>
The netrc test.pl script calls git-credential-netrc which imports the
Git module.  Pass GITPERLLIB to git-credential-netrc via PERL5LIB to
ensure the in-tree Git module is used for testing.

Signed-off-by: Luis Marsano &lt;luis.marsano@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-credential-netrc: minor whitespace cleanup in test script</title>
<updated>2018-06-18T15:44:24Z</updated>
<author>
<name>Todd Zullinger</name>
<email>tmz@pobox.com</email>
</author>
<published>2018-06-13T03:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=94a2bb56b34eaed77a6d21962999716c2104be1a'/>
<id>urn:sha1:94a2bb56b34eaed77a6d21962999716c2104be1a</id>
<content type='text'>
Signed-off-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-credential-netrc: remove use of "autodie"</title>
<updated>2018-06-13T16:49:50Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2018-06-13T07:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=627be1538ddcce8f5072b892ce415006034f371f'/>
<id>urn:sha1:627be1538ddcce8f5072b892ce415006034f371f</id>
<content type='text'>
The "autodie" module was added in Perl 5.10.1, but our INSTALL
document says "version 5.8 or later is needed".

As discussed in &lt;87efhfvxzu.fsf@evledraar.gmail.com&gt; this script is in
contrib/, so we might not want to apply that policy, however in this
case "autodie" was recently added as a "gratuitous safeguard" in
786ef50a23 ("git-credential-netrc: accept gpg option",
2018-05-12) (see
&lt;CAHqJXRE8OKSKcck1APHAHccLZhox+tZi8nNu2RA74RErX8s3Pg@mail.gmail.com&gt;).

Looking at it more carefully the addition of "autodie" inadvertently
introduced a logic error, since having it is equivalent to this patch:

    @@ -245,10 +244,10 @@ sub load_netrc {
     	if ($gpgmode) {
     		my @cmd = ($options{'gpg'}, qw(--decrypt), $file);
     		log_verbose("Using GPG to open $file: [@cmd]");
    -		open $io, "-|", @cmd;
    +		open $io, "-|", @cmd or die "@cmd: $!";
     	} else {
     		log_verbose("Opening $file...");
    -		open $io, '&lt;', $file;
    +		open $io, '&lt;', $file or die "$file: $!$!;
     	}

     	# nothing to do if the open failed (we log the error later)

As shown in the context the intent of that code is not do die but to
log the error later.

Per my reading of the file this was the only thing autodie was doing
in this file (there was no other code it altered). So let's remove it,
both to fix the logic error and to get rid of the dependency.

1. &lt;87efhfvxzu.fsf@evledraar.gmail.com&gt;
   (https://public-inbox.org/git/87efhfvxzu.fsf@evledraar.gmail.com/)
2. &lt;CAHqJXRE8OKSKcck1APHAHccLZhox+tZi8nNu2RA74RErX8s3Pg@mail.gmail.com&gt;
   (https://public-inbox.org/git/CAHqJXRE8OKSKcck1APHAHccLZhox+tZi8nNu2RA74RErX8s3Pg@mail.gmail.com/)

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-credential-netrc: accept gpg option</title>
<updated>2018-05-13T23:53:08Z</updated>
<author>
<name>Luis Marsano</name>
<email>luis.marsano@gmail.com</email>
</author>
<published>2018-05-12T09:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=786ef50a23cbd0e93d1e41982cfaba76801ed885'/>
<id>urn:sha1:786ef50a23cbd0e93d1e41982cfaba76801ed885</id>
<content type='text'>
git-credential-netrc was hardcoded to decrypt with 'gpg' regardless of
the gpg.program option. This is a problem on distributions like Debian
that call modern GnuPG something else, like 'gpg2'.
Set the command according to these settings in descending precedence
1. the git-credential-netrc command -g|--gpg option
2. the git gpg.program configuration option
3. the default: 'gpg'

For conformance with Documentation/CodingGuidelines
- use Git.pm for repository and global option queries
- document -g|--gpg command option in command usage
- test repository &amp; command options
- write documentation placeholders according to main standards

Signed-off-by: Luis Marsano &lt;luis.marsano@gmail.com&gt;
Acked-by: Ted Zlatanov &lt;tzz@lifelogs.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-credential-netrc: adapt to test framework for git</title>
<updated>2018-05-13T23:53:08Z</updated>
<author>
<name>Luis Marsano</name>
<email>luis.marsano@gmail.com</email>
</author>
<published>2018-05-12T09:17:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f07eeed123b8880b1723b1ea9d6d6f41cfb34532'/>
<id>urn:sha1:f07eeed123b8880b1723b1ea9d6d6f41cfb34532</id>
<content type='text'>
git-credential-netrc tests did not run in a test repository.
Reuse the main test framework to stage a temporary repository.
To imitate Perl tests under t/
- switch to Test::More module
- use File::Basename &amp; File::Spec::Functions

Signed-off-by: Luis Marsano &lt;luis.marsano@gmail.com&gt;
Acked-by: Ted Zlatanov &lt;tzz@lifelogs.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
