forked from ingydotnet/git-subrepo
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from ingydotnet:master #4
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
Open
pull
wants to merge
133
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 hidden or 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
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.
Start two simple ones. Add others as separate changes so file modifications can be linked to check that is added. All modified files were updated by the end-of-file-fixer.
If a script has a shebang, it should be executable and if it is a script that is executable it should have a shebang.
Convert the shellcheck test from a test to a pre-commit hook this prevents needing to updated the docker file every time there is an update to shellcheck.
Limit the removal of .gitrepo files to commits on the repo hosting the subrepo. When using filter-branch and it encountered a merge commit, continuing the filter on the second branch rewrites all of those commits, despite that not being necessary for pre-commit. If the rewritten commits were GPG signed the change in the hash results in the inability to push to the remote repo. If during development you were to change to a different branch on the remote repo that contained a merge, you would not be able to push upstream because the rewrite would not match the upstream SHAs. fixes issue #613 fixes isseu #602
Signed-off-by: Tin Lai <[email protected]>
extglob enables additional glob options. An unused wrapper for cat prevented this working. Removed the offending code. Fixes: #661
git-subrepo requires being on a branch due to how some of the internals operate. Prevent CI issues when testing PRs by ensuring we are ona branch.
Docker and the user are not the same user. Tell the system that it is ok that the .git directory isn't the same user
Git changed the error message about being in a worktree, handle both versions.
Both bash and git versions matter for subrepo, test a matrix of both instead of only the newest git version and all bash versions. Had to remove git 2.7 because it can't be built on modern Ubuntu.
Before git 2.28 the default branch wasn't supported, and before 2.25 the --default option wasn't available with git config.
When adding tests for all version I discovered that git before 2.23 caused subrepo issues due to how --is-ancestor worked. I tried to find a way to support both versions, but was not successful so I decided to drop support for the older versions.
Bash+ library requires Bash 4.0 or higher
Stop using the one build for bash+ and use one specifically designed for git-subrepo
It is taking too long to run the CI tests, run the newest git and bash releases, and the oldest git and bash releases. Leave the rest of the targets for manual evaluation.
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.4)
Can you help keep this open source service alive? 💖 Please sponsor : )