Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package git-subrepo for openSUSE:Factory checked in at 2026-09-14 16:26:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/git-subrepo (Old) and /work/SRC/openSUSE:Factory/.git-subrepo.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "git-subrepo" Mon Sep 14 16:26:40 2026 rev:6 rq:1377869 version:0.4.9 Changes: -------- --- /work/SRC/openSUSE:Factory/git-subrepo/git-subrepo.changes 2024-03-04 21:25:35.487387106 +0100 +++ /work/SRC/openSUSE:Factory/.git-subrepo.new.1265/git-subrepo.changes 2026-09-14 16:26:45.255563745 +0200 @@ -1,0 +2,15 @@ +Sun Sep 13 08:17:13 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to 0.4.9: + * Remove all subrepo refs with clean --force + * Allow the error() function to accept multiple arguments + * Clone --force no longer changes the tracked branch + * Clearer error message when the subrepo parent is not found + * Use configured default branch for the init command + * Add --force to the fetch command + * Fix quoting causing pathname collisions + * Drop Group tags +- Rebase fix-shebangs.patch: drop hunk for sourced-only + help-functions.bash, upstream removed its shebang + +------------------------------------------------------------------- Old: ---- 0.4.6.tar.gz New: ---- 0.4.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ git-subrepo.spec ++++++ --- /var/tmp/diff_new_pack.LzLkU8/_old 2026-09-14 16:26:46.331608763 +0200 +++ /var/tmp/diff_new_pack.LzLkU8/_new 2026-09-14 16:26:46.333608846 +0200 @@ -1,7 +1,7 @@ # # spec file for package git-subrepo # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,11 +17,10 @@ Name: git-subrepo -Version: 0.4.6 +Version: 0.4.9 Release: 0 Summary: Git Submodule Alternative License: MIT -Group: Development/Tools/Version Control URL: https://github.com/ingydotnet/git-subrepo Source: https://github.com/ingydotnet/git-subrepo/archive/%{version}.tar.gz Patch0: fix-shebangs.patch @@ -39,7 +38,6 @@ %package bash-completion Summary: Bash completion for git-subrepo -Group: Productivity/File utilities Requires: bash-completion Supplements: (git-subrepo and bash-completion) BuildArch: noarch @@ -49,7 +47,6 @@ %package zsh-completion Summary: ZSH completion for git-subrepo -Group: Productivity/File utilities Supplements: (git-subrepo and zsh) BuildArch: noarch ++++++ 0.4.6.tar.gz -> 0.4.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/.github/workflows/test.yml new/git-subrepo-0.4.9/.github/workflows/test.yml --- old/git-subrepo-0.4.6/.github/workflows/test.yml 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/.github/workflows/test.yml 2024-07-25 18:52:20.000000000 +0200 @@ -20,4 +20,10 @@ - run: git config --global user.email "[email protected]"; git config --global user.name "Your Name"; - - run: make test + git config --global init.defaultBranch "master"; + git config --global --add safe.directory "$PWD"; + git config --global --add safe.directory "$PWD.git"; + - if: startsWith(matrix.os, 'macos') + run: make test + - if: startsWith(matrix.os, 'ubuntu') + run: make docker-tests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/Changes new/git-subrepo-0.4.9/Changes --- old/git-subrepo-0.4.6/Changes 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/Changes 2024-07-25 18:52:20.000000000 +0200 @@ -1,3 +1,29 @@ +version: 0.4.9 +date: Mon 25 Jul 2024 11:23:34 AM CST +- Revert Fix bash-completion due to not being compatible with Windows +--- +version: 0.4.8 +date: Mon 22 Jul 2024 07:40:00 AM CST +- 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 +--- +version: 0.4.7 +date: Sun 7 Jul 2024 11:04:00 AM EST +- 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 --- version: 0.4.6 date: Fri 21 Apr 2023 10:18:34 AM EST diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/Intro.pod new/git-subrepo-0.4.9/Intro.pod --- old/git-subrepo-0.4.6/Intro.pod 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/Intro.pod 2024-07-25 18:52:20.000000000 +0200 @@ -78,7 +78,7 @@ =item * L<http://ayende.com/blog/4746/the-problem-with-git-submodules> -=item * L<http://somethingsinistral.net/blog/git-submodules-are-probably-not-the-answer/> +=item * L<https://web.archive.org/web/20171101202911/http://somethingsinistral.net/blog/git-submodules-are-probably-not-the-answer/> =item * L<http://codingkilledthecat.wordpress.com/2012/04/28/why-your-company-shouldnt-use-git-submodules/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/Makefile new/git-subrepo-0.4.9/Makefile --- old/git-subrepo-0.4.6/Makefile 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/Makefile 2024-07-25 18:52:20.000000000 +0200 @@ -22,16 +22,16 @@ INSTALL_MAN1 ?= $(DESTDIR)$(PREFIX)/share/man/man1 # Docker variables: -DOCKER_TAG ?= 0.0.4 +DOCKER_TAG ?= 0.0.6 DOCKER_IMAGE := ingy/bash-testing:$(DOCKER_TAG) BASH_VERSIONS ?= 5.1 5.0 4.4 4.3 4.2 4.1 4.0 DOCKER_TESTS := $(BASH_VERSIONS:%=docker-test-%) -GIT_VERSIONS := 2.29 2.25 2.17 2.7 +GIT_VERSIONS := 2.45 2.40 2.30 2.29 2.25 2.17 2.7 prove ?= test ?= test/ -bash ?= 5.0 -git ?= 2.29 +bash ?= 5.1 +git ?= 2.45 # Basic targets: default: help @@ -63,7 +63,7 @@ install -d -m 0755 $(INSTALL_LIB)/ install -C -m 0755 $(LIB) $(INSTALL_LIB)/ install -d -m 0755 $(INSTALL_EXT)/ - install -C -m 0755 $(EXTS) $(INSTALL_EXT)/ + install -C -m 0644 $(EXTS) $(INSTALL_EXT)/ install -d -m 0755 $(INSTALL_MAN1)/ install -C -m 0644 $(MAN1)/$(NAME).1 $(INSTALL_MAN1)/ @@ -106,7 +106,7 @@ rm -fr tmp test/tmp define docker-make-test - docker run -i -t --rm \ + docker run --rm \ -v $(PWD):/git-subrepo \ -w /git-subrepo \ $(DOCKER_IMAGE) \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/Meta new/git-subrepo-0.4.9/Meta --- old/git-subrepo-0.4.6/Meta 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/Meta 2024-07-25 18:52:20.000000000 +0200 @@ -1,11 +1,11 @@ =meta: 0.0.2 name: git-subrepo -version: 0.4.6 +version: 0.4.9 abstract: Git Submodule Alternative homepage: https://github.com/ingydotnet/git-subrepo#readme license: MIT -copyright: 2013-2023 +copyright: 2013-2024 author: name: Ingy döt Net diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/ReadMe.pod new/git-subrepo-0.4.9/ReadMe.pod --- old/git-subrepo-0.4.6/ReadMe.pod 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/ReadMe.pod 2024-07-25 18:52:20.000000000 +0200 @@ -250,7 +250,7 @@ The C<push> command accepts the C<--all>, C<--branch=>, C<--dry-run>, C<--file>, C<--force>, C<--merge>, C<--message>, C<--rebase>, C<--remote=>, C<--squash> and C<--update> options. -=item C<< git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>] >> +=item C<< git subrepo fetch <subdir>|--force --all [-r <remote>] [-b <branch>] >> Fetch the remote/upstream content for a subrepo. @@ -259,7 +259,7 @@ called C<< subrepo/<subdir> >>. These are temporary and you can easily remove them with the subrepo C<clean> command. -The C<fetch> command accepts the C<--all>, C<--branch=> and C<--remote=> options. +The C<fetch> command accepts the C<--force>, C<--all>, C<--branch=> and C<--remote=> options. =item C<< git subrepo branch <subdir>|--all [-f] [-F] >> @@ -642,8 +642,8 @@ =head1 Status -The git-subrepo command has been in use for well over a year and seems to get -the job done. Development is still ongoing but mostly just for fixing bugs. +The git-subrepo command has been used in production and seems to get the job +done. Development is still ongoing but mostly just for fixing bugs. Trying subrepo out is simple and painless (this is not C<git submodule>). Nothing is permanent (if you do not push to shared remotes). ie You can always diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/doc/git-subrepo.swim new/git-subrepo-0.4.9/doc/git-subrepo.swim --- old/git-subrepo-0.4.6/doc/git-subrepo.swim 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/doc/git-subrepo.swim 2024-07-25 18:52:20.000000000 +0200 @@ -214,7 +214,7 @@ `--force`, `--merge`, `--message`, `--rebase`, `--remote=`, `--squash` and `--update` options. -- `git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>]` +- `git subrepo fetch <subdir>|--force --all [-r <remote>] [-b <branch>]` Fetch the remote/upstream content for a subrepo. @@ -223,7 +223,7 @@ `subrepo/<subdir>`. These are temporary and you can easily remove them with the subrepo `clean` command. - The `fetch` command accepts the `--all`, `--branch=` and `--remote=` options. + The `fetch` command accepts the `--force`, `--all`, `--branch=` and `--remote=` options. - `git subrepo branch <subdir>|--all [-f] [-F]` @@ -577,7 +577,7 @@ = Status -The git-subrepo command has been in use for well over a year and seems to get +The git-subrepo command has been used in production and seems to get the job done. Development is still ongoing but mostly just for fixing bugs. Trying subrepo out is simple and painless (this is not `git submodule`). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/doc/intro-to-subrepo.swim new/git-subrepo-0.4.9/doc/intro-to-subrepo.swim --- old/git-subrepo-0.4.6/doc/intro-to-subrepo.swim 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/doc/intro-to-subrepo.swim 2024-07-25 18:52:20.000000000 +0200 @@ -61,7 +61,7 @@ Submodules tend to receive a lot of bad press. Here's some of it: * http://ayende.com/blog/4746/the-problem-with-git-submodules -* http://somethingsinistral.net/blog/git-submodules-are-probably-not-the-answer/ +* https://web.archive.org/web/20171101202911/http://somethingsinistral.net/blog/git-submodules-are-probably-not-the-answer/ * http://codingkilledthecat.wordpress.com/2012/04/28/why-your-company-shouldnt-use-git-submodules/ A quick recap of some of the good and bad things about submodules: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/lib/git-subrepo new/git-subrepo-0.4.9/lib/git-subrepo --- old/git-subrepo-0.4.6/lib/git-subrepo 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/lib/git-subrepo 2024-07-25 18:52:20.000000000 +0200 @@ -30,7 +30,7 @@ bash+:import :std can version-check -VERSION=0.4.6 +VERSION=0.4.9 REQUIRED_BASH_VERSION=4.0 REQUIRED_GIT_VERSION=2.7.0 GIT_TMP=$(git rev-parse --git-common-dir 2> /dev/null || echo .git)/tmp @@ -166,7 +166,7 @@ # Run the command on all subrepos local args=( "${command_arguments[@]}" ) get-all-subrepos - for subdir in ${subrepos[*]}; do + for subdir in "${subrepos[@]}"; do command-prepare subrepo_remote= subrepo_branch= @@ -211,8 +211,11 @@ # `git subrepo init <subdir>` command: command:init() { command-setup +subdir + local default_branch= + default_branch=$(git config init.defaultbranch) + default_branch=${default_branch:=master} local remote=${subrepo_remote:=none} - local branch=${subrepo_branch:=master} + local branch=${subrepo_branch:=$default_branch} # Init new subrepo from the subdir: subrepo:init @@ -488,6 +491,13 @@ fi o "Remove the old subdir." RUN git rm -r -- "$subdir" + + if [[ -z $override_branch ]]; then + o "Determine the upstream head branch." + get-upstream-head-branch + subrepo_branch="$output" + override_branch="$output" # Force update of the branch in .gitrepo + fi else assert-subdir-empty if [[ -z $subrepo_branch ]]; then @@ -737,7 +747,27 @@ local first_gitrepo_commit= o "Subrepo parent: $subrepo_parent" + if [[ $subrepo_parent ]]; then + + # Check if the subrepo parent is an ancestor of HEAD. + # For example rebasing the commit that touched the subrepo + # could make the commit no longer match. + local parent_is_ancestor= + git merge-base --is-ancestor "$subrepo_parent" HEAD && parent_is_ancestor="true" + if [[ -z "$parent_is_ancestor" ]]; then + local prev_merge_point + prev_merge_point=$(git log -1 -G "commit =" --format="%H" "$gitrepo") + # We want the SHA of the patch before the sync point just in case someone made a modifcation in the + # actual sync commit + prev_merge_point=$(git log -1 --format="%H" "$prev_merge_point"^) + error "The last sync point (where upstream and the subrepo were equal) is not an ancestor. \n \ + This is usually caused by a rebase affecting that commit. \n \ + To recover set the subrepo parent in '$gitrepo'\n \ + to '$prev_merge_point' \n \ + and validate the subrepo by comparing with 'git subrepo branch $subdir'" + fi + local prev_commit= local ancestor= o "Create new commits with parents into the subrepo fetch" @@ -1026,6 +1056,11 @@ git update-ref -d "$ref" fi done + git show-ref | while read -r hash ref; do + if [[ $ref == "refs/original/refs/heads/subrepo/$suffix"* ]]; then + git update-ref -d "$ref" + fi + done fi } @@ -1148,7 +1183,7 @@ options_clone='branch edit force message method' options_config='force' options_commit='edit fetch force message' -options_fetch='all branch remote' +options_fetch='all branch force remote' options_init='branch remote method' options_pull='all branch edit force message remote update' options_push='all branch force message remote squash update' @@ -1245,11 +1280,11 @@ if [[ $i -ge $num ]]; then usage-error "Command '$command' requires arg '${arg#+}'." fi - printf -v ${arg#+} -- "$value" + printf -v "${arg#+}" -- "$value" # Look for function name after ':' to provide a default value else if [[ $i -lt $num ]]; then - printf -v ${arg%:*} -- "$value" + printf -v "${arg%:*}" -- "$value" elif [[ $arg =~ : ]]; then "${arg#*:}" fi @@ -1963,7 +1998,7 @@ # Nicely report common error messages: error() { - echo -e "git-subrepo: $1" >&2 + echo -e "git-subrepo:" "$@" >&2 exit 1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/lib/git-subrepo.d/help-functions.bash new/git-subrepo-0.4.9/lib/git-subrepo.d/help-functions.bash --- old/git-subrepo-0.4.6/lib/git-subrepo.d/help-functions.bash 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/lib/git-subrepo.d/help-functions.bash 2024-07-25 18:52:20.000000000 +0200 @@ -1,5 +1,3 @@ -#!/usr/bin/env bash - # DO NOT EDIT. This file generated by pkg/bin/generate-help-functions.pl. set -e @@ -11,7 +9,7 @@ clone clone <repository> [<subdir>] [-b <branch>] [-f] [-m <msg>] [--file=<msg file>] [-e] [--method <merge|rebase>] commit commit <subdir> [<subrepo-ref>] [-m <msg>] [--file=<msg file>] [-e] [-f] [-F] config config <subdir> <option> [<value>] [-f] -fetch fetch <subdir>|--all [-r <remote>] [-b <branch>] +fetch fetch <subdir>|--force --all [-r <remote>] [-b <branch>] help help [<command>|--all] init init <subdir> [-r <remote>] [-b <branch>] [--method <merge|rebase>] pull pull <subdir>|--all [-M|-R|-f] [-m <msg>] [--file=<msg file>] [-e] [-b <branch>] [-r <remote>] [-u] @@ -142,7 +140,7 @@ help:fetch() { cat <<'...' - Usage: git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>] + Usage: git subrepo fetch <subdir>|--force --all [-r <remote>] [-b <branch>] Fetch the remote/upstream content for a subrepo. @@ -152,7 +150,7 @@ `subrepo/<subdir>`. These are temporary and you can easily remove them with the subrepo `clean` command. - The `fetch` command accepts the `--all`, `--branch=` and `--remote=` options. + The `fetch` command accepts the `--force`, `--all`, `--branch=` and `--remote=` options. ... } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/man/man1/git-subrepo.1 new/git-subrepo-0.4.9/man/man1/git-subrepo.1 --- old/git-subrepo-0.4.6/man/man1/git-subrepo.1 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/man/man1/git-subrepo.1 2024-07-25 18:52:20.000000000 +0200 @@ -1,4 +1,5 @@ -.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) +.\" -*- mode: troff; coding: utf-8 -*- +.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== @@ -15,29 +16,12 @@ .ft R .fi .. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' . ds C` . ds C' 'br\} @@ -71,15 +55,15 @@ .\" ======================================================================== .\" .IX Title "STDIN 1" -.TH STDIN 1 "August 2022" "Generated by Swim v0.1.48" "Git Submodule Alternative" +.TH STDIN 1 2024-07-22 "Generated by Swim v0.1.48" "Git Submodule Alternative" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh -.SH "Name" +.SH Name .IX Header "Name" git-subrepo \- Git Submodule Alternative -.SH "Synopsis" +.SH Synopsis .IX Header "Synopsis" .Vb 1 \& git subrepo \-h # Help Overview @@ -101,71 +85,71 @@ \& git subrepo version \& git subrepo upgrade .Ve -.SH "Description" +.SH Description .IX Header "Description" -This git command \*(L"clones\*(R" an external git repo into a subdirectory of your +This git command "clones" an external git repo into a subdirectory of your repo. Later on, upstream changes can be pulled in, and local changes can be pushed back. Simple. -.SH "Benefits" +.SH Benefits .IX Header "Benefits" This command is an improvement from \f(CW\*(C`git\-submodule\*(C'\fR and \f(CW\*(C`git\-subtree\*(C'\fR; two other git commands with similar goals, but various problems. .PP It assumes there are 3 main roles of people interacting with a repo, and attempts to serve them all well: -.IP "\(bu" 4 +.IP \(bu 4 \&\fBowner\fR \- The person who authors/owns/maintains a repo. -.IP "\(bu" 4 +.IP \(bu 4 \&\fBusers\fR \- People who are just using/installing the repo. -.IP "\(bu" 4 +.IP \(bu 4 \&\fBcollaborators\fR \- People who commit code to the repo and subrepos. .PP The \f(CW\*(C`git\-subrepo\*(C'\fR command benefits these roles in the following ways: -.IP "\(bu" 4 +.IP \(bu 4 Simple and intuitive commandline usage (with tab completion). -.IP "\(bu" 4 +.IP \(bu 4 Users get your repo and all your subrepos just by cloning your repo. -.IP "\(bu" 4 +.IP \(bu 4 Users do not need to install \f(CW\*(C`git\-subrepo\*(C'\fR, ever. -.IP "\(bu" 4 +.IP \(bu 4 Collaborators do not need to install unless they want to push/pull. -.IP "\(bu" 4 +.IP \(bu 4 Collaborators know when a subdir is a subrepo (it has a \f(CW\*(C`.gitrepo\*(C'\fR file). -.IP "\(bu" 4 +.IP \(bu 4 The \f(CW\*(C`.gitrepo\*(C'\fR file never gets pushed back to the subrepo upstream. -.IP "\(bu" 4 +.IP \(bu 4 Well named branches and remotes are generated for manual operations. -.IP "\(bu" 4 +.IP \(bu 4 Owners do not deal with the complications of keeping submodules in sync. -.IP "\(bu" 4 +.IP \(bu 4 Subrepo repositories can contain subrepos themselves. -.IP "\(bu" 4 +.IP \(bu 4 Branching with subrepos JustWorks™. -.IP "\(bu" 4 +.IP \(bu 4 Different branches can have different subrepos in different states, etc. -.IP "\(bu" 4 +.IP \(bu 4 Moving/renaming/deleting a subrepo subdir JustWorks™. -.IP "\(bu" 4 +.IP \(bu 4 You can \f(CW\*(C`init\*(C'\fR an existing subdirectory into a subrepo. -.IP "\(bu" 4 +.IP \(bu 4 Your git history is kept squeaky clean. -.IP "\(bu" 4 +.IP \(bu 4 Upstream history (clone/pull) is condensed into a single commit. -.IP "\(bu" 4 +.IP \(bu 4 Pulls can use a \f(CW\*(C`merge\*(C'\fR, \f(CW\*(C`rebase\*(C'\fR or \f(CW\*(C`force\*(C'\fR strategies. -.IP "\(bu" 4 +.IP \(bu 4 You can see the subrepo history with \f(CW\*(C`git log subrepo/<subdir>/fetch\*(C'\fR. -.IP "\(bu" 4 +.IP \(bu 4 Commits pushed back upstream are \fBnot\fR condensed (by default). -.IP "\(bu" 4 +.IP \(bu 4 Trivial to try any subrepo operations and then reset back. -.IP "\(bu" 4 +.IP \(bu 4 No configuration required. -.IP "\(bu" 4 +.IP \(bu 4 Does not introduce history that messes up other git commands. -.IP "\(bu" 4 +.IP \(bu 4 Fixes known rebase failures with \f(CW\*(C`git\-subtree\*(C'\fR. -.SH "Installation" +.SH Installation .IX Header "Installation" The best short answer is: .PP @@ -174,10 +158,10 @@ \& echo \*(Aqsource /path/to/git\-subrepo/.rc\*(Aq >> ~/.bashrc .Ve .PP -The complete \*(L"Installation Instructions\*(R" can be found below. +The complete "Installation Instructions" can be found below. .PP Note: git-subrepo needs a git version (> 2.7) that supports worktree:s. -.SH "Commands" +.SH Commands .IX Header "Commands" All the \fBsubrepo\fR commands use names of actual Git commands and try to do operations that are similar to their Git counterparts. They also attempt to @@ -204,7 +188,7 @@ \&\fIsubdir\fR. From the subdir, all the current information about the subrepo can be obtained. .Sp -The \f(CW\*(C`\-\-force\*(C'\fR option will \*(L"reclone\*(R" (completely replace) an existing subdir. +The \f(CW\*(C`\-\-force\*(C'\fR option will "reclone" (completely replace) an existing subdir. .Sp The \f(CW\*(C`\-\-method\*(C'\fR option will decide how the join process between branches are performed. The default option is merge. @@ -223,7 +207,7 @@ .Sp If you specify the \f(CW\*(C`\-\-remote\*(C'\fR (and optionally the \f(CW\*(C`\-\-branch\*(C'\fR) option, the values will be added to the \f(CW\*(C`<subdir>/.gitrepo\*(C'\fR file. The \f(CW\*(C`\-\-remote\*(C'\fR -option is the upstream \s-1URL,\s0 and the \f(CW\*(C`\-\-branch\*(C'\fR option is the upstream branch +option is the upstream URL, and the \f(CW\*(C`\-\-branch\*(C'\fR option is the upstream branch to push to. These values will be needed to do a \f(CW\*(C`git subrepo push\*(C'\fR command, but they can be provided later on the \f(CW\*(C`push\*(C'\fR command (and saved to \f(CW\*(C`<<subdir\*(C'\fR/.gitrepo >> if you also specify the \f(CW\*(C`\-\-update\*(C'\fR option). .Sp @@ -297,24 +281,24 @@ (although that is probably a rare use case). .Sp The \f(CW\*(C`push\*(C'\fR command requires a branch that has been properly merged/rebased -with the upstream \s-1HEAD\s0 (unless the upstream \s-1HEAD\s0 is empty, which is common -when doing a first \f(CW\*(C`push\*(C'\fR after an \f(CW\*(C`init\*(C'\fR). That means the upstream \s-1HEAD\s0 is +with the upstream HEAD (unless the upstream HEAD is empty, which is common +when doing a first \f(CW\*(C`push\*(C'\fR after an \f(CW\*(C`init\*(C'\fR). That means the upstream HEAD is one of the commits in the branch. .Sp By default the branch ref \f(CW\*(C`refs/subrepo/<subdir>/pull\*(C'\fR will be pushed, but you can specify a (properly merged) branch to push. .Sp After that, the \f(CW\*(C`push\*(C'\fR command just checks that the branch contains the -upstream \s-1HEAD\s0 and then pushes it upstream. +upstream HEAD and then pushes it upstream. .Sp The \f(CW\*(C`\-\-force\*(C'\fR option will do a force push. Force pushes are typically discouraged. Only use this option if you fully understand it. (The \f(CW\*(C`\-\-force\*(C'\fR -option will \s-1NOT\s0 check for a proper merge. \s-1ANY\s0 branch will be force pushed!) +option will NOT check for a proper merge. ANY branch will be force pushed!) .Sp The \f(CW\*(C`push\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-branch=\*(C'\fR, \f(CW\*(C`\-\-dry\-run\*(C'\fR, \f(CW\*(C`\-\-file\*(C'\fR, \f(CW\*(C`\-\-force\*(C'\fR, \f(CW\*(C`\-\-merge\*(C'\fR, \f(CW\*(C`\-\-message\*(C'\fR, \f(CW\*(C`\-\-rebase\*(C'\fR, \f(CW\*(C`\-\-remote=\*(C'\fR, \f(CW\*(C`\-\-squash\*(C'\fR and \f(CW\*(C`\-\-update\*(C'\fR options. -.ie n .IP """git subrepo fetch <subdir>|\-\-all [\-r <remote>] [\-b <branch>]""" 4 -.el .IP "\f(CWgit subrepo fetch <subdir>|\-\-all [\-r <remote>] [\-b <branch>]\fR" 4 -.IX Item "git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>]" +.ie n .IP """git subrepo fetch <subdir>|\-\-force \-\-all [\-r <remote>] [\-b <branch>]""" 4 +.el .IP "\f(CWgit subrepo fetch <subdir>|\-\-force \-\-all [\-r <remote>] [\-b <branch>]\fR" 4 +.IX Item "git subrepo fetch <subdir>|--force --all [-r <remote>] [-b <branch>]" Fetch the remote/upstream content for a subrepo. .Sp It will create a Git reference called \f(CW\*(C`subrepo/<subdir>/fetch\*(C'\fR that @@ -322,7 +306,7 @@ called \f(CW\*(C`subrepo/<subdir>\*(C'\fR. These are temporary and you can easily remove them with the subrepo \f(CW\*(C`clean\*(C'\fR command. .Sp -The \f(CW\*(C`fetch\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-branch=\*(C'\fR and \f(CW\*(C`\-\-remote=\*(C'\fR options. +The \f(CW\*(C`fetch\*(C'\fR command accepts the \f(CW\*(C`\-\-force\*(C'\fR, \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-branch=\*(C'\fR and \f(CW\*(C`\-\-remote=\*(C'\fR options. .ie n .IP """git subrepo branch <subdir>|\-\-all [\-f] [\-F]""" 4 .el .IP "\f(CWgit subrepo branch <subdir>|\-\-all [\-f] [\-F]\fR" 4 .IX Item "git subrepo branch <subdir>|--all [-f] [-F]" @@ -341,11 +325,11 @@ .IX Item "git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [--file=<msg file>] [-e] [-f] [-F]" Add subrepo branch to current history as a single commit. .Sp -This command is generally used after a hand-merge. You have done a \f(CW\*(C`subrepobranch\*(C'\fR and merged (rebased) it with the upstream. This command takes the \s-1HEAD\s0 +This command is generally used after a hand-merge. You have done a \f(CW\*(C`subrepobranch\*(C'\fR and merged (rebased) it with the upstream. This command takes the HEAD of that branch, puts its content into the subrepo subdir and adds a new commit for it to the top of your mainline history. .Sp -This command requires that the upstream \s-1HEAD\s0 be in the \f(CW\*(C`subrepo/<subdir>\*(C'\fR +This command requires that the upstream HEAD be in the \f(CW\*(C`subrepo/<subdir>\*(C'\fR branch history. That way the same branch can push upstream. Use the \f(CW\*(C`\-\-force\*(C'\fR option to commit anyway. .Sp @@ -359,7 +343,7 @@ The \f(CW\*(C`\-\-verbose\*(C'\fR option will show all the recent local and upstream commits. .Sp Use \f(CW\*(C`\-\-ALL\*(C'\fR to show the subrepos of the subrepos (ie the -\&\*(L"subsubrepos\*(R"), if any. +"subsubrepos"), if any. .Sp The \f(CW\*(C`status\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, \f(CW\*(C`\-\-ALL\*(C'\fR, \f(CW\*(C`\-\-fetch\*(C'\fR, \f(CW\*(C`\-\-quiet\*(C'\fR and \f(CW\*(C`\-\-verbose\*(C'\fR options. @@ -379,7 +363,7 @@ change to a branch where a subrepo doesn't exist, and then \f(CW\*(C`\-\-all\*(C'\fR won't find it. Use \f(CW\*(C`\-\-ALL\*(C'\fR to remove any artifacts that were ever created by subrepo. .Sp -To remove \s-1ALL\s0 subrepo artifacts: +To remove ALL subrepo artifacts: .Sp .Vb 1 \& git subrepo clean \-\-ALL \-\-force @@ -429,15 +413,15 @@ .SH "Command Options" .IX Header "Command Options" .ie n .IP """\-h""" 4 -.el .IP "\f(CW\-h\fR" 4 +.el .IP \f(CW\-h\fR 4 .IX Item "-h" Show a brief view of the commands and options. .ie n .IP """\-\-help""" 4 -.el .IP "\f(CW\-\-help\fR" 4 +.el .IP \f(CW\-\-help\fR 4 .IX Item "--help" Gives an overview of the help options available for the subrepo command. .ie n .IP """\-\-version""" 4 -.el .IP "\f(CW\-\-version\fR" 4 +.el .IP \f(CW\-\-version\fR 4 .IX Item "--version" Print the git-subrepo version. Just the version number. Try the \f(CW\*(C`version\*(C'\fR command for more version info. @@ -450,12 +434,12 @@ .el .IP "\f(CW\-\-ALL\fR (\f(CW\-A\fR)" 4 .IX Item "--ALL (-A)" If you have subrepos that also have subrepos themselves, issue the command to -\&\s-1ALL\s0 of them. Note that the \f(CW\*(C`\-\-ALL\*(C'\fR option only works for a subset of the +ALL of them. Note that the \f(CW\*(C`\-\-ALL\*(C'\fR option only works for a subset of the commands that \f(CW\*(C`\-\-all\*(C'\fR works for. .ie n .IP """\-\-branch=<branch\-name>"" (""\-b <branch\-name>"")" 4 .el .IP "\f(CW\-\-branch=<branch\-name>\fR (\f(CW\-b <branch\-name>\fR)" 4 .IX Item "--branch=<branch-name> (-b <branch-name>)" -Use a different upstream branch-name than the remote \s-1HEAD\s0 or the one saved in +Use a different upstream branch-name than the remote HEAD or the one saved in \&\f(CW\*(C`.gitrepo\*(C'\fR locally. .ie n .IP """\-\-dry\-run"" (""\-N"")" 4 .el .IP "\f(CW\-\-dry\-run\fR (\f(CW\-N\fR)" 4 @@ -479,7 +463,7 @@ .IX Item "--force (-f)" Use this option to force certain commands that fail in the general case. .Sp -\&\s-1NOTE:\s0 The \f(CW\*(C`\-\-force\*(C'\fR option means different things for different commands. +NOTE: The \f(CW\*(C`\-\-force\*(C'\fR option means different things for different commands. Read the command specific doc for the exact meaning. .ie n .IP """\-\-merge"" (""\-M"")" 4 .el .IP "\f(CW\-\-merge\fR (\f(CW\-M\fR)" 4 @@ -528,41 +512,41 @@ .el .IP "\f(CW\-\-DEBUG\fR (\f(CW\-x\fR)" 4 .IX Item "--DEBUG (-x)" Use the Bash \f(CW\*(C`set \-x\*(C'\fR option which prints every command before it is -run. \s-1VERY\s0 noisy, but extremely useful in deep debugging. Applicable to +run. VERY noisy, but extremely useful in deep debugging. Applicable to all commands. .SH "Environment Variables" .IX Header "Environment Variables" The \f(CW\*(C`git\-subrepo\*(C'\fR command exports and honors some environment variables: .ie n .IP """GIT_SUBREPO_ROOT""" 4 -.el .IP "\f(CWGIT_SUBREPO_ROOT\fR" 4 +.el .IP \f(CWGIT_SUBREPO_ROOT\fR 4 .IX Item "GIT_SUBREPO_ROOT" This is set by the \f(CW\*(C`.rc\*(C'\fR file, if you use that method to install / enable \f(CW\*(C`git\-subrepo\*(C'\fR. It contains the path of the \f(CW\*(C`git\-subrepo\*(C'\fR repository. .ie n .IP """GIT_SUBREPO_RUNNING""" 4 -.el .IP "\f(CWGIT_SUBREPO_RUNNING\fR" 4 +.el .IP \f(CWGIT_SUBREPO_RUNNING\fR 4 .IX Item "GIT_SUBREPO_RUNNING" This variable is exported when \f(CW\*(C`git\-subrepo\*(C'\fR is running. It is set to the pid of the \f(CW\*(C`git\-subrepo\*(C'\fR process that is running. Other processes, like git hooks for instance, can use this information to adjust accordingly. .ie n .IP """GIT_SUBREPO_COMMAND""" 4 -.el .IP "\f(CWGIT_SUBREPO_COMMAND\fR" 4 +.el .IP \f(CWGIT_SUBREPO_COMMAND\fR 4 .IX Item "GIT_SUBREPO_COMMAND" This variable is exported when \f(CW\*(C`git\-subrepo\*(C'\fR is running. It is set to the name of the \f(CW\*(C`git\-subrepo\*(C'\fR subcommand that is running. .ie n .IP """GIT_SUBREPO_PAGER""" 4 -.el .IP "\f(CWGIT_SUBREPO_PAGER\fR" 4 +.el .IP \f(CWGIT_SUBREPO_PAGER\fR 4 .IX Item "GIT_SUBREPO_PAGER" Use this to specify the pager to use for long output commands. Defaults to \&\f(CW$PAGER\fR or \f(CW\*(C`less\*(C'\fR. .ie n .IP """GIT_SUBREPO_QUIET""" 4 -.el .IP "\f(CWGIT_SUBREPO_QUIET\fR" 4 +.el .IP \f(CWGIT_SUBREPO_QUIET\fR 4 .IX Item "GIT_SUBREPO_QUIET" Set this for quiet (\f(CW\*(C`\-q\*(C'\fR) output. .ie n .IP """GIT_SUBREPO_VERBOSE""" 4 -.el .IP "\f(CWGIT_SUBREPO_VERBOSE\fR" 4 +.el .IP \f(CWGIT_SUBREPO_VERBOSE\fR 4 .IX Item "GIT_SUBREPO_VERBOSE" Set this for verbose (\f(CW\*(C`\-v\*(C'\fR) output. .ie n .IP """GIT_SUBREPO_DEBUG""" 4 -.el .IP "\f(CWGIT_SUBREPO_DEBUG\fR" 4 +.el .IP \f(CWGIT_SUBREPO_DEBUG\fR 4 .IX Item "GIT_SUBREPO_DEBUG" Set this for debugging (\f(CW\*(C`\-d\*(C'\fR) output. .SH "Installation Instructions" @@ -604,18 +588,18 @@ .Ve .PP This method does not account for upgrading and command completion yet. -.SS "Windows" +.SS Windows .IX Subsection "Windows" This command is known to work in these Windows environments: -.IP "\(bu" 4 -Git for Windows \*(-- <https://git\-for\-windows.github.io/> -.IP "\(bu" 4 -Babun \*(-- <http://babun.github.io/> -.IP "\(bu" 4 -Cygwin \*(-- <https://www.cygwin.com/> +.IP \(bu 4 +Git for Windows \-\- <https://git\-for\-windows.github.io/> +.IP \(bu 4 +Babun \-\- <http://babun.github.io/> +.IP \(bu 4 +Cygwin \-\- <https://www.cygwin.com/> .PP Let us know if there are others that it works (or doesn't work) in. -.SH "Testing" +.SH Testing .IX Header "Testing" The \f(CW\*(C`git\-subrepo\*(C'\fR repository comes with a extensive test suite. You can run it with: @@ -629,7 +613,7 @@ .Vb 1 \& prove \-v test .Ve -.SH "Upgrading" +.SH Upgrading .IX Header "Upgrading" If you used the \f(CW\*(C`.rc\*(C'\fR or \f(CW\*(C`PATH\*(C'\fR method of installation, just run this to upgrade \f(CW\*(C`git\-subrepo\*(C'\fR: @@ -666,17 +650,17 @@ .PP On your system, the Git completion script might be found at any of the following locations (or somewhere else that we don't know about): -.IP "\(bu" 4 +.IP \(bu 4 \&\f(CW\*(C`/etc/bash_completion.d/git\*(C'\fR -.IP "\(bu" 4 +.IP \(bu 4 \&\f(CW\*(C`/usr/share/bash\-completion/git\*(C'\fR -.IP "\(bu" 4 +.IP \(bu 4 \&\f(CW\*(C`/usr/share/bash\-completion/completions/git\*(C'\fR -.IP "\(bu" 4 +.IP \(bu 4 \&\f(CW\*(C`/opt/local/share/bash\-completion/completions/git\*(C'\fR -.IP "\(bu" 4 +.IP \(bu 4 \&\f(CW\*(C`/usr/local/etc/bash_completion.d/git\*(C'\fR -.IP "\(bu" 4 +.IP \(bu 4 \&\f(CW\*(C`~/.homebrew/etc/bash_completion.d/git\*(C'\fR .PP In case you can't find any of these, this repository contains a copy of the @@ -701,10 +685,10 @@ .Vb 1 \& fpath=(\*(Aq/path/to/git\-subrepo/share/zsh\-completion\*(Aq $fpath) .Ve -.SH "Status" +.SH Status .IX Header "Status" -The git-subrepo command has been in use for well over a year and seems to get -the job done. Development is still ongoing but mostly just for fixing bugs. +The git-subrepo command has been used in production and seems to get the job +done. Development is still ongoing but mostly just for fixing bugs. .PP Trying subrepo out is simple and painless (this is not \f(CW\*(C`git submodule\*(C'\fR). Nothing is permanent (if you do not push to shared remotes). ie You can always @@ -716,28 +700,28 @@ .PP If you want to chat about the \f(CW\*(C`git\-subrepo\*(C'\fR command, join \f(CW\*(C`#gitcommands\*(C'\fR on \&\f(CW\*(C`irc.freenode.net\*(C'\fR. -.SH "Notes" +.SH Notes .IX Header "Notes" -.IP "\(bu" 4 -Works on \s-1POSIX\s0 systems: Linux, \s-1BSD, OSX,\s0 etc. -.IP "\(bu" 4 -Works on various Windows environments. See \*(L"Windows\*(R" section above. -.IP "\(bu" 4 +.IP \(bu 4 +Works on POSIX systems: Linux, BSD, OSX, etc. +.IP \(bu 4 +Works on various Windows environments. See "Windows" section above. +.IP \(bu 4 The \f(CW\*(C`git\-subrepo\*(C'\fR repo itself has 2 subrepos under the \f(CW\*(C`ext/\*(C'\fR subdirectory. -.IP "\(bu" 4 +.IP \(bu 4 Written in (very modern) Bash, with full test suite. Take a look. -.IP "\(bu" 4 +.IP \(bu 4 A \f(CW\*(C`.gitrepo\*(C'\fR file never is in the top level dir (next to a \f(CW\*(C`.git/\*(C'\fR dir). -.SH "Authors" +.SH Authors .IX Header "Authors" -.IP "\(bu" 4 +.IP \(bu 4 Ingy döt Net <[email protected]> -.IP "\(bu" 4 +.IP \(bu 4 Magnus Carlsson <[email protected]> -.IP "\(bu" 4 +.IP \(bu 4 Austin Morgan <[email protected]> .SH "License and Copyright" .IX Header "License and Copyright" -The \s-1MIT\s0 License (\s-1MIT\s0) +The MIT License (MIT) .PP Copyright (c) 2013\-2020 Ingy döt Net diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/pkg/bin/generate-completion.pl new/git-subrepo-0.4.9/pkg/bin/generate-completion.pl --- old/git-subrepo-0.4.6/pkg/bin/generate-completion.pl 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/pkg/bin/generate-completion.pl 2024-07-25 18:52:20.000000000 +0200 @@ -156,8 +156,6 @@ } print <<"..."; -#!bash - # DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl. _git_subrepo() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/pkg/bin/generate-help-functions.pl new/git-subrepo-0.4.9/pkg/bin/generate-help-functions.pl --- old/git-subrepo-0.4.6/pkg/bin/generate-help-functions.pl 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/pkg/bin/generate-help-functions.pl 2024-07-25 18:52:20.000000000 +0200 @@ -29,8 +29,6 @@ sub write_start { print <<'...'; -#!/usr/bin/env bash - # DO NOT EDIT. This file generated by pkg/bin/generate-help-functions.pl. set -e diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/share/completion.bash new/git-subrepo-0.4.9/share/completion.bash --- old/git-subrepo-0.4.6/share/completion.bash 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/share/completion.bash 2024-07-25 18:52:20.000000000 +0200 @@ -1,9 +1,7 @@ -#!bash - # DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl. _git_subrepo() { - local _opts=" -h --help --version -a --all -A --ALL -b= --branch= -e --edit -f --force -F --fetch -M= --method= --Default -m= --message= -r= --remote= -s --squash -u --update -q --quiet -v --verbose -d --debug -x --DEBUG" + local _opts=" -h --help --version -a --all -A --ALL -b= --branch= -e --edit -f --force -F --fetch -M= --method= -m= --message= --file= -r= --remote= -s --squash -u --update -q --quiet -v --verbose -d --debug -x --DEBUG" local subcommands="branch clean clone commit config fetch help init pull push status upgrade version" local subdircommands="branch clean commit config fetch pull push status" local subcommand="$(__git_find_on_cmdline "$subcommands")" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/share/enable-completion.sh new/git-subrepo-0.4.9/share/enable-completion.sh --- old/git-subrepo-0.4.6/share/enable-completion.sh 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/share/enable-completion.sh 2024-07-25 18:52:20.000000000 +0200 @@ -19,7 +19,7 @@ # If a file is found at the location being checked… if [[ -f $f ]]; then # …source it. - source $f + source "$f" [[ $(type -t __gitcomp) != function ]] && echo "WARNING: Git completion script '$f' does not provide a '__gitcomp' function" # Proceed to loading our Bash completion facilities. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/share/zsh-completion/_git-subrepo new/git-subrepo-0.4.9/share/zsh-completion/_git-subrepo --- old/git-subrepo-0.4.6/share/zsh-completion/_git-subrepo 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/share/zsh-completion/_git-subrepo 2024-07-25 18:52:20.000000000 +0200 @@ -19,9 +19,9 @@ '(-e --edit)'{-e,--edit}'[Edit commit message]' \ '(-f --force)'{-f,--force}'[Force certain operations]' \ '(-F --fetch)'{-F,--fetch}'[Fetch the upstream content first]' \ - '(-M --method)'{-M,--method}'[Method when you join, valid options are '"'"'merge'"'"' or '"'"'rebase'"'"']:M' \ - '--Default[is '"'"'merge'"'"']' \ + '(-M --method)'{-M,--method}'[Join method: '"'"'merge'"'"' (default) or '"'"'rebase'"'"']:M' \ '(-m --message)'{-m,--message}'[Specify a commit message]:m' \ + '--file[Specify a commit message file]:file' \ '(-r --remote)'{-r,--remote}'[Specify the upstream remote to push/pull/fetch]:r' \ '(-s --squash)'{-s,--squash}'[Squash commits on push]' \ '(-u --update)'{-u,--update}'[Add the --branch and/or --remote overrides to .gitrepo]' \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/test/Dockerfile new/git-subrepo-0.4.9/test/Dockerfile --- old/git-subrepo-0.4.6/test/Dockerfile 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/test/Dockerfile 2024-07-25 18:52:20.000000000 +0200 @@ -108,4 +108,5 @@ RUN git config --global user.email "[email protected]" \ && git config --global user.name "Your Name" \ + && git config --global --add safe.directory /git-subrepo/.git \ && true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/test/push-force.t new/git-subrepo-0.4.9/test/push-force.t --- old/git-subrepo-0.4.6/test/push-force.t 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/test/push-force.t 2024-07-25 18:52:20.000000000 +0200 @@ -35,13 +35,14 @@ ( set +x cd "$OWNER/bar" - git pull + git pull --rebase=false ) &> /dev/null || die test-exists \ "$OWNER/bar/Bar2" \ "$OWNER/bar/Foo1" \ + # Test that a fresh repo is not contaminated ( git clone "$UPSTREAM/bar" "$OWNER/newbar" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/test/rebase.t new/git-subrepo-0.4.9/test/rebase.t --- old/git-subrepo-0.4.6/test/rebase.t 1970-01-01 01:00:00.000000000 +0100 +++ new/git-subrepo-0.4.9/test/rebase.t 2024-07-25 18:52:20.000000000 +0200 @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +set -e + +source test/setup + +use Test::More + +# Setup foo with 2 branches, one before the subrepo +# is added and one after so that we can rebase +# thus destroying the parent in two ways. The first +# destroys the second parent, but leave a reference to +# a merge point. The second such that no history of +# a merge point exists. + +clone-foo-and-bar + +( + cd "$OWNER/foo" + git switch -c branch1 + add-new-files foo1 + subrepo-clone-bar-into-foo + git branch branch2 + add-new-files foo2 +) &> /dev/null || die + +( + cd "$OWNER/bar" + add-new-files bar2 + git push +) &> /dev/null || die + +( + cd "$OWNER/foo" + # Rebasing onto this merge point will still + # be able to find the merge point at branch1 + git subrepo pull bar +) + +( + cd "$OWNER/foo" + git switch branch2 + add-new-files foo-branch2 + git switch branch1 + git rebase branch2 +) &> /dev/null || die + +# Force subrepo to search of the parent SHA, +# validate it found the prevous merge point +{ + output=$( + cd "$OWNER/foo" + git subrepo clean --force --all + catch git subrepo branch bar + ) + + like "$output" "caused by a rebase" \ + "subrepo detected merge point" +} + +done_testing 1 + +teardown \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/test/reclone.t new/git-subrepo-0.4.9/test/reclone.t --- old/git-subrepo-0.4.6/test/reclone.t 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/test/reclone.t 2024-07-25 18:52:20.000000000 +0200 @@ -16,6 +16,7 @@ test-exists \ "$OWNER/foo/bar/bard/" +# Test that reclone is not done if not needed. export XYZ=1 is "$( cd "$OWNER/foo" @@ -24,19 +25,25 @@ "Subrepo 'bar' is up to date." \ "No reclone if same commit" +# Test that reclone of a different ref works. ( cd "$OWNER/foo" git subrepo --quiet clone --force "$UPSTREAM/bar" --branch=refs/tags/A ) +is "$(git -C "$OWNER"/foo subrepo config bar branch)" \ + "Subrepo 'bar' option 'branch' has value 'refs/tags/A'." test-exists \ "!$OWNER/foo/bar/bard/" +# Test that reclone back to (implicit) master works. ( cd "$OWNER/foo" - git subrepo --quiet clone -f "$UPSTREAM/bar" --branch=master + git subrepo --quiet clone -f "$UPSTREAM/bar" ) +is "$(git -C "$OWNER"/foo subrepo config bar branch)" \ + "Subrepo 'bar' option 'branch' has value 'master'." test-exists \ "$OWNER/foo/bar/bard/" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-subrepo-0.4.6/test/status.t new/git-subrepo-0.4.9/test/status.t --- old/git-subrepo-0.4.6/test/status.t 2023-04-21 17:31:08.000000000 +0200 +++ new/git-subrepo-0.4.9/test/status.t 2024-07-25 18:52:20.000000000 +0200 @@ -9,18 +9,18 @@ clone-foo-and-bar ( - cd $OWNER/foo - git subrepo clone ../../../$UPSTREAM/bar - git subrepo clone ../../../$UPSTREAM/foo bar/foo + cd "$OWNER"/foo + git subrepo clone "$UPSTREAM"/bar + git subrepo clone "$UPSTREAM"/foo bar/foo mkdir lib - git subrepo clone ../../../$UPSTREAM/bar lib/bar - git subrepo clone ../../../$UPSTREAM/foo lib/bar/foo + git subrepo clone "$UPSTREAM"/bar lib/bar + git subrepo clone "$UPSTREAM"/foo lib/bar/foo ) &> /dev/null || die { output=$( - cd $OWNER/foo - git subrepo status + cd "$OWNER"/foo + git subrepo status --all ) like "$output" "2 subrepos:" \ @@ -41,43 +41,46 @@ { output=$( - cd $OWNER/foo - git subrepo status --all-recursive + cd "$OWNER"/foo + git subrepo status --ALL ) like "$output" "4 subrepos:" \ "'status --ALL' intro ok" - like "$output" "Git subrepo 'ext/bashplus':" \ - "ext/bashplus is in 'status --ALL'" + like "$output" "Git subrepo 'bar':" \ + "bar is in 'status --ALL'" - like "$output" "Git subrepo 'ext/test-more-bash':" \ - "ext/test-more-bash is in 'status --ALL'" + like "$output" "Git subrepo 'lib/bar':" \ + "lib/bar is in 'status --ALL'" - like "$output" "Git subrepo 'ext/test-more-bash/ext/bashplus':" \ - "ext/test-more-bash/ext/bashplus is in 'status --ALL'" + like "$output" "Git subrepo 'bar/foo':" \ + "bar/foo is in 'status --ALL'" - like "$output" "Git subrepo 'ext/test-more-bash/ext/test-tap-bash':" \ - "ext/test-more-bash/ext/test-tap-bash is in 'status --ALL'" + like "$output" "Git subrepo 'lib/bar/foo':" \ + "lib/bar/foo is in 'status --ALL'" } { - output=$(git subrepo status --all) + output=$( + cd "$OWNER"/foo + git subrepo status --all + ) like "$output" "2 subrepos:" \ "'status --all' intro ok" - like "$output" "Git subrepo 'ext/bashplus':" \ - "ext/bashplus is in 'status --all'" + like "$output" "Git subrepo 'bar':" \ + "bar is in 'status --all'" - like "$output" "Git subrepo 'ext/test-more-bash':" \ - "ext/test-more-bash is in 'status --all'" + like "$output" "Git subrepo 'lib/bar':" \ + "lib/bar is in 'status --all'" - unlike "$output" "Git subrepo 'ext/test-more-bash/ext/bashplus':" \ - "ext/test-more-bash/ext/bashplus is not in 'status --all'" + unlike "$output" "Git subrepo 'bar/foo':" \ + "bar/foo is not in 'status --all'" - unlike "$output" "Git subrepo 'ext/test-more-bash/ext/test-tap-bash':" \ - "ext/test-more-bash/ext/test-tap-bash is not in 'status --all'" + unlike "$output" "Git subrepo 'lib/bar/foo':" \ + "lib/bar/foo is not in 'status --all'" } done_testing 15 ++++++ fix-shebangs.patch ++++++ --- /var/tmp/diff_new_pack.LzLkU8/_old 2026-09-14 16:26:46.549617884 +0200 +++ /var/tmp/diff_new_pack.LzLkU8/_new 2026-09-14 16:26:46.556618177 +0200 @@ -4,11 +4,9 @@ Subject: [PATCH] Fixed path to Bash in shebangs. --- - ext/bashplus/bin/bash+ | 2 +- - ext/bashplus/lib/bash+.bash | 1 + - lib/git-subrepo | 2 +- - lib/git-subrepo.d/help-functions.bash | 2 +- - 4 files changed, 4 insertions(+), 3 deletions(-) + ext/bashplus/bin/bash+ | 2 +- + lib/git-subrepo | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/bashplus/bin/bash+ b/ext/bashplus/bin/bash+ index 5178550..cc3de54 100755 @@ -30,16 +28,6 @@ # # # Copyright 2013-2020 - Ingy döt Net <[email protected]> -diff --git a/lib/git-subrepo.d/help-functions.bash b/lib/git-subrepo.d/help-functions.bash -index 28ff603..4446abb 100644 ---- a/lib/git-subrepo.d/help-functions.bash -+++ b/lib/git-subrepo.d/help-functions.bash -@@ -1,4 +1,4 @@ --#!/usr/bin/env bash -+#!/bin/bash - - # DO NOT EDIT. This file generated by pkg/bin/generate-help-functions.pl. - -- 2.14.3
