-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: git subrepo script * fix: script improvements * feat: Bundle git subrepo for CI use
- Loading branch information
Showing
132 changed files
with
13,584 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!fish | ||
|
||
#------------------------------------------------------------------------------ | ||
# | ||
# This is the `git-subrepo` initialization script. | ||
# | ||
# This script turns on the `git-subrepo` Git subcommand and its manpages, for | ||
# the *Fish* shell. | ||
# | ||
# Just add a line like this to your `~/.config/fish/config.fish`: | ||
# | ||
# source /path/to/git-subrepo/.fish.rc | ||
# | ||
#------------------------------------------------------------------------------ | ||
|
||
set GIT_SUBREPO_ROOT (dirname (realpath (status --current-filename))) | ||
set PATH $GIT_SUBREPO_ROOT/lib $PATH | ||
|
||
set -q MANPATH || set MANPATH '' | ||
set MANPATH $MANPATH $GIT_SUBREPO_ROOT/man |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text eol=lf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [ '*' ] | ||
pull_request: | ||
branches: [ '*' ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- if: startsWith(matrix.os, 'macos') | ||
run: brew install bash | ||
- run: | ||
git config --global user.email "you@example.com"; | ||
git config --global user.name "Your Name"; | ||
- run: make test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/test/tmp/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# shellcheck shell=bash disable=2128 | ||
|
||
#------------------------------------------------------------------------------ | ||
# | ||
# This is the `git-subrepo` initialization script. | ||
# | ||
# This script turns on the `git-subrepo` Git subcommand, its manpages and TAB | ||
# completion for the *Bash* and *zsh* shells. | ||
# | ||
# Just add a line like this to your shell startup configuration: | ||
# | ||
# source /path/to/git-subrepo/.rc | ||
# | ||
#------------------------------------------------------------------------------ | ||
|
||
[[ -n ${ZSH_VERSION-} ]] && | ||
GIT_SUBREPO_ROOT=$0 || | ||
GIT_SUBREPO_ROOT=$BASH_SOURCE | ||
|
||
[[ $GIT_SUBREPO_ROOT =~ ^/ ]] || | ||
GIT_SUBREPO_ROOT=$PWD/$GIT_SUBREPO_ROOT | ||
|
||
GIT_SUBREPO_ROOT=$( | ||
cd "$(dirname "$GIT_SUBREPO_ROOT")" || return | ||
pwd | ||
) || return | ||
export GIT_SUBREPO_ROOT | ||
|
||
export PATH=$GIT_SUBREPO_ROOT/lib:$PATH | ||
export MANPATH=$GIT_SUBREPO_ROOT/man:$MANPATH | ||
|
||
source "$GIT_SUBREPO_ROOT/share/enable-completion.sh" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
--- | ||
version: 0.4.6 | ||
date: Fri 21 Apr 2023 10:18:34 AM EST | ||
- Remove stale worktrees in the push command | ||
--- | ||
version: 0.4.5 | ||
date: Thu 22 Sep 2022 23:03:24 PM EST | ||
- Add --file option | ||
- Fix git subrepo status command for subrepos that share a common prefix. Closes #534. | ||
- Don't allow -b and --all | ||
- Fix documentation links | ||
- fix tests to support use of a default branch git config that is not "master" | ||
- pass --force to git add so a user's global .gitignore does not affect tests | ||
- Fix .rc and enable-completion.sh for zsh before 5.1 | ||
- Better format for options | ||
- The `fpath` variable is an array; expand correctly | ||
--- | ||
version: 0.4.3 | ||
date: Sat 21 Nov 2020 03:28:43 PM EST | ||
- Apply PR#511 to fix a 0.4.2 regression in zsh | ||
--- | ||
version: 0.4.2 | ||
date: Tue Nov 17 14:10:10 CST 2020 | ||
- Covert to GitHub Actions for testing | ||
- Add docker support to test multiple git/bash versions together | ||
- Require Bash 4.0+ | ||
- Use shellcheck as linter and address issues discovered | ||
- Discovered bug in git where @ is not a valid workspace name | ||
- Add --force command to subrepo pull | ||
- Now works with paths that contain spaces | ||
- Numerous documentation fixes | ||
- When two branches pointed to the same commit, we would | ||
sometimes pick the wrong branch. | ||
- ZSH completion fixes | ||
- Allow tests to run outside a git repo | ||
- Would not work if a different date format was set in git config | ||
- Address delay in filter-branch on newer versions of git | ||
- Display the git merge message on merge failure | ||
- Allow FISH integration on MacOS. | ||
- Add manpage support for FISH shell | ||
--- | ||
version: 0.4.1 | ||
date: Thu Jan 9 17:11:21 CST 2020 | ||
- Fix Bash version error messages and add to .rc | ||
- Nicer YAML formatting in .travis.yml | ||
- Wrap a long line | ||
- Update the docs | ||
- Force `make update` to always update docs | ||
- Don't use XXX in perl stuff | ||
- Add testing on MacOS | ||
- Remove conflicting -C from install -d commands. | ||
- Update version requirement documentation | ||
- Correct error message in branch | ||
- Use topo-order in subrepo branch | ||
- Make “git subrepo clean -f ...” delete refs correctly | ||
- Fix #410 Push empty repositories with recent git versions | ||
- Make subrepo work when run in a worktree | ||
- Simplify finding subrepos | ||
- Ask git to find the .gitrepo files | ||
- Doc: fix sentence repetition | ||
- Fix typos | ||
- Fixed typo | ||
- Travis CI not checking out a branch. | ||
--- | ||
version: 0.4.0 | ||
date: Thu Nov 8 12:26:38 CET 2018 | ||
changes: | ||
- Fix #325 Do not squash main repo commits | ||
- Improve error message for worktree handling | ||
- Make version checking portable. #307 | ||
- #307, improve version check | ||
- #307, update version requirement | ||
- Fix part #308, Add stderr output if commands fail | ||
- Fix #306: Add check to prevent following commits with no .gitrepo | ||
- Remove dry-run flag as it's not implemented. Make sure branch --force delete worktree | ||
- Fix #296, Replace --first-parent with --ancestry-path | ||
- Fix #291, specify Trusty host to get new 2.x git | ||
- Fix #258, add --no-tags to git fetch | ||
- Test that no remotes are created during clone | ||
- #257 Remove remote creation to avoid problems with fetch --all | ||
- (origin/issue/150_to_0.4.0) Fix remove-worktree, remove unused parameters | ||
- Regenerate completion files | ||
- filter-branch operation should not be done on HEAD | ||
- Cleanup push and add hint to push directly after pull | ||
- Simplify cleanup and add worktree to status | ||
- Add --method option to init/clone, add a 'config' command | ||
- Updated unit tests to support the new logic | ||
- Use 'git worktree' for merge/rebase | ||
- Update docs to reflect how things should work | ||
- Make it possible to specify commit messages | ||
- Redesign, trash the tree hash approach and use merges instead | ||
- Add release branches to travis-ci | ||
- Add --method option to init/clone, add a 'config' command | ||
- Detect multiple pulls, use -u flag to decide | ||
- Don't reuse previous commit message when using --all | ||
- Update the docs for pull and push | ||
- Update error messages when failing merge/rebase | ||
- Fix env var bug in test/push.t | ||
- Do not overwrite author information | ||
--- | ||
version: 0.3.1 | ||
date: Tue Jan 3 23:08:56 PST 2017 | ||
changes: | ||
- Updated release for homebrew | ||
- Fix #192 | ||
--- | ||
version: 0.3.0 | ||
date: Wed Dec 2 19:19:43 PST 2015 | ||
changes: | ||
- Fix issue #98 and host of others (89, 91, 95, 96) | ||
- Adds support for the merge-base command | ||
- Adds stability to many commands | ||
- Command completion updates | ||
- Rename `init` to `.rc` | ||
- @grimmySwe++ @dzzh++ @jrosdahl++ @perlpunk++ | ||
--- | ||
version: 0.2.3 | ||
date: Sun Aug 9 13:44:22 PDT 2015 | ||
changes: | ||
- Fix issues #75 and #76 | ||
--- | ||
version: 0.2.2 | ||
date: Wed Jul 22 09:45:13 PDT 2015 | ||
changes: | ||
- Added the `init` subcommand | ||
- Applied doc fixes | ||
--- | ||
version: 0.2.1 | ||
date: Sat Mar 28 07:52:22 PDT 2015 | ||
changes: | ||
- Allows subrepo clone to clone to an empty branch; fixes #26. | ||
- Refs in status | ||
- Empty parent set to 'none' in .gitrepo file. | ||
- Bug fixes | ||
--- | ||
version: 0.2.0 | ||
date: Sat Jan 24 06:22:05 PST 2015 | ||
changes: | ||
- Massive overhaul | ||
- .gitrepo files remain the same so backwards compatible | ||
- Introduce the branch and commit subcommands | ||
- The checkout subcommand goes away | ||
- Operations work much smoother like normal Git flow | ||
- Much more testing | ||
- Better doc | ||
--- | ||
version: 0.1.0 | ||
date: Fri Feb 21 12:25:53 2014 -0800 | ||
changes: | ||
- First version |
Oops, something went wrong.