summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit
Commit message (Collapse)AuthorAge
* nix-prefetch-git: don't fetch everything when given a hashAtemu2021-07-12
| | | | | | | | It's hugely inefficient as we can't use shallow cloning (--depth=1). This has been tested and adapted for quite a few hosts fetchgit is used on in Nixpkgs. For those where fetching the hash directly doesn't work (most notably git.savannah.gnu.org), we simply fall back to the old method.
* fetchgit: document --fetch-lfs flagBjørn Forsman2021-05-07
| | | | Fixes: 74128561 ("fetchgit: add lfs support")
* Merge pull request #111782 from Luflosi/fetchgit-escape-regexSandro2021-03-21
|\ | | | | fetchgit: escape dot in regex
| * fetchgit: escape dot in regexLuflosi2021-02-03
| | | | | | | | This regex should match files ending in `.git`, not any character and `git` after that.
* | Merge pull request #104714 from codedownio/tree-hashestaku02021-02-20
|\ \ | | | | | | fetchgit: support passing tree hashes as "rev"
| * | fetchgit: support passing tree hashes as "rev"Tom McLaughlin2021-02-13
| |/
* / nix-prefetch-git: Run git-init with --initial-branch=masterMichael Weiss2021-02-18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for this change is simply to avoid the following messages that are unnecessary and can be confusing (and these messages will be repeated for each submodule): hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch <name> hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m <name> With this change the behaviour remains unchanged (apart from the suppressed "warning" in the console output of course) and therefore this doesn't cause any hashes to change and by default nix-prefetch-git uses the "fetchgit" branch anyway (branchName can be set to override the default): Switched to a new branch 'fetchgit' For that reason the initial branch name doesn't matter anyway and since we're not relying on / hardcoding "master" we could simply switch to "main" (which seems most common nowadays). See [0] for more details on why this wouldn't break anything. However, since the initial branch name doesn't matter and to avoid any additional risks it was "decided" to keep using "master" (s. #113313). [0]: https://github.com/NixOS/nixpkgs/pull/113313#issuecomment-780589516
* treewide: stdenvNoCC.lib -> libBen Siraphob2021-01-27
|
* fetchgit: add lfs supportJonathan Ringer2021-01-11
|
* nix-prefetch-git: also add store path to json outputJörg Thalheim2020-05-04
|
* Revert "fetchzip, fetchgit: cleanup handling of optional features and ↵Benjamin Hipple2020-03-26
| | | | whitespace"
* Merge pull request #79581 from bhipple/feature/fetcher-whitespace-cleanBenjamin Hipple2020-03-26
|\ | | | | fetchzip, fetchgit: cleanup handling of optional features and whitespace
| * fetchzip, fetchgit: cleanup handling of optional features and whitespaceBenjamin Hipple2020-02-08
| | | | | | | | | | No intended functional difference, just trying to polish to make this easier to extend and more aligned with other nix conventions.
* | nix-prefetch-git: Fix output manglingJan Tojnar2020-02-14
| | | | | | | | | | | | | | | | `git repack` and `git gc` sometimes print “Nothing new to pack.” to stdout, which breaks redirecting output to JSON file. Let’s move the stdout of all git calls where it is not used to stderr so that we still receive the info but it does not pollute our output.
* | nix-prefetch-git: report deepClone & leaveDotGitJan Tojnar2020-02-14
|/ | | | | Just like in https://github.com/NixOS/nixpkgs/commit/be30ba8e0eabbc2483122ddf9d5911484df3a578 we want `fetchgit (builtins.fromJSON (builtins.readFile ./src.json))` to work.
* nix-prefetch-git: list --branch-name in helpDima2019-11-26
| | | | | Listing the option and brief explanation. Addresses: https://github.com/NixOS/nixpkgs/issues/74182
* fetchgitPrivate: Remove fetcheradisbladis2019-11-14
| | | | | | Since Nix 2.0 we have `builtins.fetchGit` which is a much better option since it runs in the evaluator and has access to the regular users ssh keys.
* treewide: remove redundant quotesvolth2019-09-08
|
* nix-prefetch-git: Remove some pack file non-determinismSilvan Mosberger2019-08-31
|
* Merge pull request #54543 from thefloweringash/git-prefetch-errorsMatthew Bauer2019-06-18
|\ | | | | nix-prefetch-git: propagate errors under --quiet
| * nix-prefetch-git: propagate errors under --quietAndrew Childs2019-01-25
| |
* | nix-prefetch-git: add -h as shortcut for --help to improve quality of lifeAndreas Rammhold2019-05-03
|/ | | | | | | | | Especially as a new user it is a much better experience to receive a proper help response to `-h`. Currently passing `-h` will cause some runtime error with the `git remote` error help being shown. Not very helpful. It doesn't hurt to be a bit more user friendly in this case.
* prefer-fetch-remote: an overlay to fetch on remote buildersJörg Thalheim2019-01-18
| | | | | | This is useful when running tools like NixOps or nix-review on workstations where the upload to the builder is significantly slower then downloading the source on the builder itself.
* treewide: Fix broken Gmane URLsCraig Younkins2018-12-25
|
* pkgs/*: remove unreferenced function argumentsvolth2018-07-21
|
* fetchgit: adapt regex to git 2.18.0Guillaume Maudoux2018-06-28
|
* nix-prefetch-git: fix output `fetchSubmodules` propertyTim Cuthbertson2018-06-17
|
* nix-prefetch-git: fix handling of submodules with spacesLionello Lunesu2018-05-04
| | | | | | | | The script would parse the output of `git submodule status` but didn't handle paths with spaces in them. This would result in the following error when trying to determine the URL of the submodule: error: key does not contain a section: .url
* nix-prefetch-git: fix extraction of submodule hashes on latest gitWill Dietz2018-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: According to git-submodule manpage, "git submodule status" prefixes the hash with a '-' if it is not initialized, and other chars in other circumstances. (this is consistent on the various git versions tested) nix-prefetch-git runs "git submodule init" which does you'd think, but apparently despite this earlier versions of git before 2.16 would still give the hash the '-' suffix. In particular this is the behavior when using 2.15 and 2.14.1 from the nixos-17.09 and nixos-17.03 channels respectively. The script then used awk to drop the first char of the first field which does the wrong thing when there is no prefix emitted: while there is a space character before the hash, this is not part of the field and so we ended up eating the first character of the hash. To fix this in a way that also works with the previous behavior, this commit instead uses awk to grab the hash field and uses tr to delete any '-' chars should they be present. This seems to work in my testing, and for example can now successfully fetch the source for "nginxModules.brotli" where previously it would generate an error: fatal: '22564a95d9ab58865a096b8d9f7324ea5f2e03e' is not a commit and a branch 'fetchgit' cannot be created from it (we dropped a '2' from the beginning of the hash)
* treewide: Fetchers should use `stdenvNoCC`.John Ericson2018-01-10
|
* treewide: Fixed output fetch* derivations should use `nativeBuildInputs`John Ericson2018-01-09
|
* fetchgitPrivate: put our custom ssh on PATHFrederik Rietdijk2017-11-07
| | | | | | | | | Currently we wrap ssh so it can find the config file passed in by <ssh-config-file>. If one however uses ProxyCommand ssh, then ssh that is on PATH is taken (which is also unavailable when using nix-shell --pure), which is the plain ${openssh}/bin/ssh. This commit makes sure our wrapped ssh is available on PATH.
* fetchzip and friends: Set "name" to "source" by defaultEelco Dolstra2017-10-30
| | | | | | This makes them produce the same store paths as builtins.fetchgit, builtins.fetchTarball etc. See https://github.com/NixOS/nix/commit/65b5f177b5fbb1b0778ede047a13a3cee9c59cfe.
* Update nix-prefetch-gitVaibhav Sagar2017-10-29
| | | s/understand/understood/
* Merge: more compatibility for git* fetchersVladimír Čunát2017-07-09
|\ | | | | | | | | | | | | | | | | | | | | | | They're additional commits from #26877. Changing names of the fetched stuff was changing very many hashes, and I think it's better to avoid that for the moment to reduce work needed by nixpkgs users. The fetchers are expected to be commonly used even outside nixpkgs, and the current naming wasn't that bad usually. (commit analogical to d10c3cc5eedf58e80e2; I haven't noticed the part of the PR has already got to master)
| * support old naming, just add escaping of unsafe charsVolth2017-07-05
| |
| * gitRepoToName: make it compatible with old fetchFromGitHub's ↵Volth2017-07-04
| | | | | | | | "${repo}-${rev}-scr" to avoid mass rebuild
* | Merge branch 'master' into stagingVladimír Čunát2017-07-05
|\ \ | |/ |/|
| * nix-prefetch-git: add --quiet to --helpHarmen2017-07-03
| |
* | fetchFromGitHub: fix fetchSubmodules=true when revision is not hexadecimalVolth2017-07-04
|/
* fetchgit: support "git@server:repo" URLsBjørn Forsman2017-06-24
| | | | | Update the code that extracts the base name from a git repo URL so that it can deal with URLs like "git@server:repo".
* fetchgit: add postFetch argumentDaiderd Jordan2017-06-03
|
* fetch-*: remove md5 supportRobin Gloster2017-03-20
| | | | fixes #4491
* nix-prefetch-git: remove call to non-existent print_metadata command; ↵Connor Clark2017-01-03
| | | | improve hash mismatch error message.
* nix-prefetch-git: fix date fieldJörg Thalheim2016-12-05
| | | | | in some cases `git show` include tag information in the output this is suppressed by the parameter '-1'
* nix-prefetch-git: escape string fields properlyJörg Thalheim2016-12-05
| | | | json requires certain characters to be escaped in strings.
* Remove fetchMD5warnEelco Dolstra2016-11-30
| | | | | | | | Deprecation warnings should not be used in Nixpkgs because they spam innocent "nix-env -qa" users with (in this case) dozens of messages that they can't do anything about. This also reverts commit 2ca883338389b7ab995924a0cab0211993bdf1da.
* fetchFromGitHub: add fetchSubmodules optionAlexey Shmalko2016-11-18
| | | | | | | | This commit extends fetchFromGitHub with ability to fetch GitHub repositories with submodules, so we can use the function consistently with all GitHub repositories. Note it doesn't change the previous behavior.
* fetch*: print a trace warning about md5 deprecationMichael Raskin2016-10-09
|
* lib/fetchers.nix: factor out impure proxy vars (#18702)Profpatsch2016-09-17
| | | | Apparently everyone just copied those variables, instead of creating a library constant for them. Some even removed the comment. -.-