forked from ingydotnet/git-subrepo
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from ingydotnet:master #4
Open
pull
wants to merge
115
commits into
stackriot:master
Choose a base branch
from
ingydotnet:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The command in `.travis.yml` that is supposed to checkout the branch did not actually check out the branch.
Thanks to chaoflow and jrosdahl for the suggestions
In a worktree (created with git worktree add) there is no .git directory. It is instead a file. To make subrepo work correctly in that case, use the --git-common-dir argument to git rev-parse to find the path to the .git directory. In a regular directory it just prints .git, but in a worktree it prints the full path to the .git directory. Fix #361
Git 2.21 (possibly earlier) changed the output of the error for empty repos from Couldn't to couldn't. Make the regex case insensitive.
Since Git can store refs in packed form (see git-pack-refs(1)), use “git update-ref -d” to delete refs instead of assuming that they are stored in the .git/refs directory.
When creating branches git has a number of ways it can recurse with --ancestry-path. Force it to use topo-order to give consistent results. Having consistent history makes the tests succeed. This was discovered by serbogus. Change-Id: I630f7cd1594205823990c6290bc3ac8f990b8930
If the subrepo branch command could not find the ancestor the error message said to run git subrepo fetch of add the -F flag instead of or add the -F flag.
Since 0.4.0 git 2.7 has been required. Some of the documentation still referred to 2.5 Fixes #403 Change-Id: I150a139aaef4373be2a3c4a227c58e206e87616e
Using `find .` can (a) take a long time and (b) go outside the current repo. Using `git ls-files` is inordinately faster, and only shows subrepos of the current repo.
Fixes #427 Change-Id: I2a4939f989e53681f1cc0a4fd244d271d4b032c9
Use the default Travis version. MacOS uses an ancient version of Bash. Added instructions to update and added tests for both failure and success on Travis CI.
Update version numbers and changelog
In recent git versions, git filter-branch prints a message to use other tools and waits for the user to press Ctrl-C. Since git-subrepo uses filter-branch sensibly and doesn't show the message to the user, there's no need for this delay. Setting FILTER_BRANCH_SQUELCH disables it.
% zsh --version zsh 5.0.2 (x86_64-redhat-linux-gnu) % source git-subrepo/.rc git-subrepo/.rc:16: parse error near `]]'
This adds the subrepo command, but adding to the MANPATH variable in fish seems to cause manpages to not work for other things, from anecdotal evidence. Bash completion clearly doesn't work, but is something that could be done for fish shell at a later point, as fish shell completion definitions. Since most of subrepo is executed explicitly with bash, it seems to work fine in fish shell as far as I can tell, besides the need for a fish rc file, as added in this commit.
This adds the manual page path for the git-subrepo man page when using the fish startup script for git subrepo. This is a not uncontentious issue it seems, in fish shell, see: fish-shell/fish-shell#2090 This however seems to be the suggested solution, and appears to work well, with the man page working along with system manpages, and `manpage` command producing a reasonable result.
Unfortunately mac os has bsd variant of readlink, which doesn't support -f Use realpath which is more universal, checked on mac os and centos 7 Fixes #450
If there weren't any changes to push, remove the worktree and branch. If there were changes, then the worktree is needed.
Add a test to ensure pushing a repo that doesn't have any additional changes doesn't leave stale metadata behind.
Point release that removes stale worktrees in the push command.
Update to state that subrepo is used in production environments. Fixes #621
A number of places had incorrect quoting. Fixing this found that the paths for some tests were incorrect in the status tests.
git 2.30 added a check to ensure the permissions in the .git folder were "reasonable". When running the test in docker the user is different than the host machine and it was throwing a different error than expected when doing a git subrepo status inside the .git directory. Add a configuration option to ignore the permission mismatch during testing.
Git 2.33 and later ask the user what strategy to use when pulling This broke the pull-force test as git returned an error including how to set the setting. Added the default setting to the command to prevent this issue during tests.
Add newer git versions to the docker file
Allows for testing a greater set of git and bash configurations
- Convert testing to use docker with updated git versions - Fix numerous places where quoting was incorrect causing path name collisions - Fix pull-force test to deal with git not defaulting to merges on pulls after 2.33 - Fix issue where docker tests didn't work with git 2.30 or higher because of increased permission scrutiny. - Update readme to say this tools is in production environments - Update readme to use internet archive for old articles about subrepo no longer available on their original source
Fixes #517 and other issues in which some invocations of `error()` pass multiple arguments which are then silently ignored.
Needed to quote array expansion.
If the subrepo is tracking a branch and you reclone using git subrepo clone --force $URL without specifying -b/--branch then the branch setting in .gitrepo is not updated.
…HEAD Before, there would be a cryptic error about invalid parameters, because prev_commit would never get set. This situation can occur when the commit that last touched the subrepo has been rebased.
Did not query git to determine the default branch name, assumed it was master. Fixes #587
Sourced-only scripts should not start with hashbangs.
Bash scripts that are not to be executed standalone should not have executable permissions.
Using the 'make install' method, the default 'git-core' location of git-subrepo executable does not automatically integrate git-subrepo into git's own bash-completion. This change moves git-subrepo executable with support scripts into /usr/share/git-subrepo. Then a symlink to the 'git-subrepo' executable script has been added into /usr/bin to achieve recognition of the 'git subrepo' sub-command under the git bash-completion (through git's: --list-cmds=...,other,...). Additional adjustment of Makefile and git-subrepo script were made to make Makefile more generic and to make DESTDIR usage together with potentially overriden install vars more manageable. By overriding INSTALL_LIB and INSTALL_EXT to the same path, we achieve removal of the unnecessary 'git-subrepo.d' subdirectory inside the /usr/share/git-subrepo path. Note that non 'make install' ways of installation should work as before but without the need for the GIT_SUBREPO_ROOT variable. Potentially, if 'realpath' addition in git-sibrepo change isn't available on all target systems, readlink could still be used instead.
- Remove all subrepo refs with clean --force - Allow the error() function to accept multiple arguments - Bug fixed where clone --force could change the tracked branch - Give a detailed error message if the parent SHA could not be found - Use the git configuration to determine the default branch name for the init command - Add --force to fetch command - Fix executable settings on installed files - Remove shebangs from library only files - Fix bash-completion for instances that used make install
- Revert Fix bash-completion due to not being compatible with Windows
subrepo uses -e to ensure that all commands succeed, and fails immediately if they do not. git config reports a failure if a setting is not found causing subrepo init to silently fail if the setting did not exist on the system. Updated to use --default which returns a default value if the setting does not exist. Fixes #631
Older versions of git require git config --get instead of git config get. Newer versions support both methods so use the most widely supported. Fixes #631
When a command has an error subrepo prints instructions on how to resolve the issue. If the user supplied a commit message file that information was not included in the resolution information.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )