| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
| |
This fixes a regression caused by commit f56ab9e
("nix-prefetch-git: Include the date in the machine-readable [...]")
where a couple of directory paths printed by pushd/popd appeared before
the JSON output on stdout (thus breaking it). Fix it by redirecting the
extraneous output to /dev/null.
Reported by Michael Alan Dorman <mdorman@ironicdesign.com>.
|
|
|
|
|
|
|
| |
stdout, in strict ISO 8601 format.
This will be helpful for automatically updating fetchgit expressions
and the dates in version numbers associated with them.
|
| |
|
|
|
|
|
| |
Used shellcheck (https://github.com/koalaman/shellcheck) to validate
the script and fixed any resulting escaping and ambiguity issues.
|
|\
| |
| | |
fetchgit: remove only .git folder
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Source of this change goes back to 2009 and original version of
fetchgit at 205fb0c87eab5dd53c6a0e97b1ff0e48f141c902.
The nondeterminism is really caused by changing .git so leave other
files alone as they might be interesting.
Note: this causes a hash mismatch with Hydra's version of Git Plugin
which we should fix to comply.
|
|/ |
|
|
|
|
|
| |
The function wasn't checking that *all* of the characters where
[a-z0-9]. Fixes #13921
|
|
|
|
|
|
| |
JSON output
Previously, nix-prefetch-git would report the same JSON whether submodules were being fetched or not; with this change, the --fetch-submodules option will cause the JSON output to include "fetchSubmodules": true, so that fetchgit (builtins.fromJSON (builtins.readFile ./path/to/output.json)) will work.
|
|
|
|
|
| |
As discussed on the mailing list. The nix output was short-lived so it's
probably okay to change it.
|
| |
|
| |
|
|
|
|
| |
It turns out hashFormat has never been set.
|
|
|
|
|
|
|
|
|
| |
This commit fixes #6651.
Before this change the `nix-prefetch-git` script would use a different store
name than nix's `fetchgit` function. Because of that it was not possible to
use `nix-prefetch-git` as a way to pre-populate the store (for example when
the user it using private git dependencies that needs access to the ssh agent)
|
|
|
|
|
|
| |
The comment related to the `deepClone` and `no-deepClone` options was
misleading as these options have no relation with submodules, but on the
the depth in `git clone --depth n`.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These environment variables allow using fetchgit with git:// URLs using
the SOCKS proxy technique described in 'Using Git with a SOCKS proxy':
http://www.patthoyts.tk/blog/using-git-with-socks-proxy.html
Briefly, GIT_PROXY_COMMAND is set to a script which invokes connect[1],
which reads SOCKS_PROXY, which might be pointing to a local instance of
'ssh -D'.
[1] pkgs/tools/networking/connect
|
|\ \
| |/
|/| |
Add help flag to nix-prefetch-git
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
If "fetcher" is a string, then Nix will execute it with bash already, so
the additional bash argument in that string was redundant and apparently
causes trouble on non-Linux platforms.
Hopefully fixes https://github.com/NixOS/nixpkgs/issues/11496.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
http://hydra.nixos.org/eval/1231884
Only Darwin jobs seem to be queued now,
but we can't afford to wait for that single build slave.
|
| |/
| |
| |
| |
| | |
This is guaranteed to be bash, SmartOS has ksh by
default and doesn't work.
|
| |
| |
| |
| |
| |
| | |
The script's shebang depends on /usr/bin/env, which we don't have in chroot
environments. This patch remedies the fallout from ade9f7167dd1fec6, which
fixed https://github.com/NixOS/nixpkgs/issues/11284.
|
|/
|
|
| |
Fixes https://github.com/NixOS/nixpkgs/issues/11284.
|
|
|
|
|
|
|
|
| |
Close #9790.
This fixes checkouting for a nasty combination:
1. To be checkouted is a revision which corresponds to tag in a form "<tag>^{}".
2. This revision is not fetched by default.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This is useful when `leaveDotGit = true` and some other derivation
expects some branch name to exist.
Previously, `nix-prefetch-git` always created a branch with a
hard-coded name (`fetchgit`).
|
|
|
|
|
|
|
| |
This patch resolves https://github.com/NixOS/nixpkgs/issues/6395. Deep
cloning is useful in combination with 'leaveDotGit' for builds that want
to run "git describe" to obtain a proper version string, etc., like the
'haskellngPackages.cabal2nix' package does.
|
|
|
|
|
| |
The commit date can be used as a version number in packages that don't
have proper releases.
|
|
|
|
|
|
|
|
| |
The name detection didn't work for e.g. http://git.suckless.org/sinit/.
I tested the tarball builds now.
@shlevy claimed nixpkgs requires nix-1.8 features anyway,
so the additional check with message were superfluous.
|
|
|
|
|
| |
Instead of git-export, we get the basename of the repo, plus the
shortrev if the commit-ish is a rev.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This reverts commit f8a833cfb149b35d590e0f63fe194d1f4f9db42a.
This makes sure the check returns a zero code.
See discussion on https://github.com/NixOS/nixpkgs/commit/5af576f
|
|
|
|
|
|
| |
This reverts commit 5af576ff7f4e657c0053f66d6fba03bfd1e97669.
See discussion on https://github.com/NixOS/nixpkgs/commit/5af576f
|
| |
|
|
|
|
|
|
|
|
| |
Without this, the generated pack files are non-deterministic.
I didn't notice this issue in my earlier testing, because my test repo
had too few commits for the thread scheduling to take effect. (Test repo
had about 10 commits.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add more files to the delete list:
* .git/FETCH_HEAD
* .git/ORIG_HEAD
* .git/refs/remotes/origin/HEAD
* .git/config
Further, remove all remote branches, remove tags not reachable from the
given 'rev', do a full repack and then garbage collect unreferenced
objects.
According to my testing, the result is fully deterministic. As in "any
change done to the upstream repo, ahead of 'rev', will not affect the
hash of the resulting 'clone'". Even changing the clone URL will not
change the output hash, because .git/config is removed.
A new version of git can of course change store format, but that's
unavoidable.
For big repositories, the repack operation may be a bit heavy. But as
far as I can see there is no cheaper way to determinism.
|
|
|
|
| |
Shell isn't Perl ;-)
|
|
|
|
|
| |
Use 4 spaces per indent level instead of a mix of 2 spaces, 4 spaces and
hardtab. (According to nixpkgs coding style for shell scripts.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes a regression on OS X introduced by f83af95.
Don't use --tmpdir for mktemp, because that flag doesn't exist on OS X.
However, using -t is deprecated in GNU coreutils, so as suggested by
@ip1981 we're now using parameter expansion on ${TMPDIR:-/tmp} to
provide /tmp as a fallback if TMPDIR is not set and use it instead.
Also use this approach for nix-prefetch-cvs now in order to stay
consistent.
Reported-by: Vladimir Kirillov <proger@wilab.org.ua>
Tested-by: Igor Pashev <pashev.igor@gmail.com>
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of relying on $$ to not collide with an existing path.
Quoting the Bash manual about $$:
> Expands to the process ID of the shell. In a () subshell, it expands
> to the process ID of the current shell, not the subshell.
So, this is different from $BASHPID:
> Expands to the process ID of the current bash process. This differs
> from $$ under certain circumstances, such as subshells that do not
> require bash to be re-initialized.
But even $BASHPID is prone to race conditions if the process IDs wrap
around, so to be on the safe side, we're using mktemp here.
Closes #3784.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
|
|
|
|
| |
that way, the stdout stays compatible with nix-prefetch-{bzr,svn,hg}
|
|
|
|
|
| |
The shebang of .git/hooks depended the git's bash, which made the result
depend of that bash's path.
|
|
|
|
|
|
|
| |
There was a few files containing timestamp, so we now remove them.
It shouldn't be a problem for logs. However, index might be. Anyway,
that's better than nothing.
|
| |
|