Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
FROM ubuntu:latest

ARG USER_ID
ARG GROUP_ID

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Copenhagen

RUN apt-get update \
&& \
apt-get install -y \
sudo \
build-essential \
libcurl4-gnutls-dev \
libexpat1-dev \
gettext \
libz-dev \
libssl-dev \
asciidoc \
xmlto \
docbook-xsl \
\
tzdata \
git \
coccinelle \
&& \
ln -fs /usr/share/zoneinfo/$TZ /etc/localtime \
&& \
dpkg-reconfigure --frontend noninteractive tzdata

RUN apt-get update && apt-get install -y autoconf

RUN addgroup -gid 1001 gituser
RUN adduser --disabled-password -u 1001 -gid 1001 gituser
RUN usermod -aG sudo gituser
RUN echo 'gituser ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/010-gituser
RUN chmod 0440 /etc/sudoers.d/010-gituser

USER 1001

#WORKDIR /home/gituser/git-src/

#RUN make configure
#RUN ./configure --prefix=${HOME}/.local/

#RUN make -j$(nproc) gitweb || make gitweb
#RUN make install-gitweb

#RUN make -j$(nproc) || make
#RUN make -j$(nproc) gitweb || make gitweb
#RUN make install-gitweb
#RUN make -j$(nproc) NO_PERL=YesPlease install || make NO_PERL=YesPlease install
#RUN make install


RUN mkdir -p ${HOME}/.local/
#RUN ls -la ${HOME}/.local/bin
#ENV PATH="/home/gituser/.local/bin:${PATH}"
#RUN ls -l $HOME/.local/bin
#RUN echo $PATH $HOME

#RUN git --version
#RUN which git

RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Git User"

#WORKDIR /home/gituser/git-test/

#CMD [ "git" ]
76 changes: 76 additions & 0 deletions .devcontainer/Dockerfile.standalone
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
FROM ubuntu:latest

ARG USER_ID
ARG GROUP_ID

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Copenhagen

RUN apt-get update \
&& \
apt-get install -y \
build-essential \
libcurl4-gnutls-dev \
libexpat1-dev \
gettext \
libz-dev \
libssl-dev \
asciidoc \
xmlto \
docbook-xsl \
\
tzdata \
\
nano \
vim \
&& \
ln -fs /usr/share/zoneinfo/$TZ /etc/localtime \
&& \
dpkg-reconfigure --frontend noninteractive tzdata

RUN apt-get update && apt-get install -y autoconf

RUN addgroup -gid ${GROUP_ID} gituser
RUN adduser --disabled-password -u ${USER_ID} -gid ${GROUP_ID} gituser


COPY --chown=${USER_ID}:${GROUP_ID} ./git /home/gituser/git-src/

USER ${USER_ID}

WORKDIR /home/gituser/git-src/

RUN make configure
RUN ./configure --prefix=${HOME}/.local/

#RUN make -j$(nproc) gitweb || make gitweb
#RUN make install-gitweb

#RUN make -j$(nproc) || make
#RUN make -j$(nproc) gitweb || make gitweb
#RUN make install-gitweb
RUN make -j$(nproc) NO_PERL=YesPlease install || make NO_PERL=YesPlease install
RUN make install

WORKDIR /home/gituser/git-src/t
RUN ./t2206-add-submodule-ignored.sh -v

RUN ls -la ${HOME}/.local/
RUN ls -la ${HOME}/.local/bin
ENV PATH="/home/gituser/.local/bin:${PATH}"
RUN ls -l $HOME/.local/bin
RUN echo $PATH $HOME

RUN git --version
RUN which git

RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Git User"

WORKDIR /home/gituser/git-src/t
RUN pwd && ls -la
RUN ./t2206-add-submodule-ignored.sh -v

WORKDIR /home/gituser/git-test/

CMD [ "git" ]
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Git Dev Container",
"build": {
"dockerfile": "Dockerfile",
"context": "",
"args": {
"user_id": "1001",
"group_id": "1001"
}
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
}
},
"remoteUser": "gituser",
"features": {},
"mounts": [
"source=${localWorkspaceFolder}/,target=/home/gitusers/git-src,type=bind,consistency=cached",
"source=${localWorkspaceFolder}/,target=/home/gitusers/git-test,type=bind,consistency=cached"
],
"postCreateCommand": "echo"
}
13 changes: 7 additions & 6 deletions Documentation/config/submodule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ submodule.<name>.fetchRecurseSubmodules::

submodule.<name>.ignore::
Defines under what circumstances "git status" and the diff family show
a submodule as modified. When set to "all", it will never be considered
modified (but it will nonetheless show up in the output of status and
commit when it has been staged), "dirty" will ignore all changes
to the submodule's work tree and
a submodule as modified.
Set to "all" will never considered the submodule modified. It can
nevertheless be staged using the option --include_ignored_submodules and
it will then show up in the output of status.
Set to "dirty" will ignore all changes to the submodule's work tree and
takes only differences between the HEAD of the submodule and the commit
recorded in the superproject into account. "untracked" will additionally
let submodules with modified tracked files in their work tree show up.
Using "none" (the default when this option is not set) also shows
submodules that have untracked files in their work tree as changed.
Set to "none"(default) It is also shows submodules that have untracked
files in their work tree as changed.
This setting overrides any setting made in .gitmodules for this submodule,
both settings can be overridden on the command line by using the
"--ignore-submodules" option. The 'git submodule' commands are not
Expand Down
5 changes: 5 additions & 0 deletions Documentation/git-add.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ in linkgit:gitglossary[7].
`--force`::
Allow adding otherwise ignored files.

`--include_ignored_submodules`::
The option is also used when `submodule.<name>.ignore=all`
is set, but you want to stage an update of the submodule. The
`path` to the submodule must be explicitly specified.

`--sparse`::
Allow updating index entries outside of the sparse-checkout cone.
Normally, `git add` refuses to update index entries whose paths do
Expand Down
5 changes: 4 additions & 1 deletion Documentation/gitmodules.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ submodule.<name>.ignore::
--
all;; The submodule will never be considered modified (but will
nonetheless show up in the output of status and commit when it has
been staged).
been staged). Add `(new commits)` can be overruled using the
`git add --include_ignored_submodules <submodule.path>`
The setting affects `status`, `update-index`, `diff` and `log`(due
to underlaying `diff`).

dirty;; All changes to the submodule's work tree will be ignored, only
committed differences between the `HEAD` of the submodule and its
Expand Down
4 changes: 3 additions & 1 deletion builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ N_("The following paths are ignored by one of your .gitignore files:\n");
static int verbose, show_only, ignored_too, refresh_only;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

"Claus Schneider(Eficode) via GitGitGadget" <[email protected]>
writes:

> From: "Claus Schneider(Eficode)" <[email protected]>
>
> The include_ignored_submodules parameter is added to the function
> add_files_to_cache for usage of explicit updating the index for the updated
> submodule using the explicit patchspec to the submodule.
>
> Signed-off-by: Claus Schneider(Eficode) <[email protected]>
> ---

I still do not know enough if the overall idea of this topic is a
good idea, but let me regiew the code change at the mechanical level
(i.e., what needs fixing if these changes are good things to have).

> diff --git a/builtin/add.c b/builtin/add.c
> index 0235854f80..6d11382f33 100644
> --- a/builtin/add.c
> +++ b/builtin/add.c
> @@ -233,6 +233,7 @@ N_("The following paths are ignored by one of your .gitignore files:\n");
>  static int verbose, show_only, ignored_too, refresh_only;
>  static int ignore_add_errors, intent_to_add, ignore_missing;
>  static int warn_on_embedded_repo = 1;
> +static int include_ignored_submodules;
>  
>  #define ADDREMOVE_DEFAULT 1
>  static int addremove = ADDREMOVE_DEFAULT;
> @@ -271,6 +272,7 @@ static struct option builtin_add_options[] = {
>  	OPT_BOOL( 0 , "ignore-errors", &ignore_add_errors, N_("just skip files which cannot be added because of errors")),
>  	OPT_BOOL( 0 , "ignore-missing", &ignore_missing, N_("check if - even missing - files are ignored in dry run")),
>  	OPT_BOOL(0, "sparse", &include_sparse, N_("allow updating entries outside of the sparse-checkout cone")),
> +    OPT_BOOL(0, "include-ignored-submodules", &include_ignored_submodules, N_("add submodules even if they has configuration ignore=all")),

Wrong indentation.  Also, perhaps wrap this new line that is overly
long (*WITHOUT* rewrapping existing overly long lines)?

>  			add_files_to_cache(the_repository, NULL, NULL, NULL, 0,
> -					   0);
> +					   0, 0 );

Our coding style does not allow an extra space after "(" or before ")".

> diff --git a/read-cache-ll.h b/read-cache-ll.h
> index 71b49d9af4..2c8b4b21b1 100644
> --- a/read-cache-ll.h
> +++ b/read-cache-ll.h
> @@ -481,7 +481,7 @@ int cmp_cache_name_compare(const void *a_, const void *b_);
>  
>  int add_files_to_cache(struct repository *repo, const char *prefix,
>  		       const struct pathspec *pathspec, char *ps_matched,
> -		       int include_sparse, int flags);
> +		       int include_sparse, int flags, int ignored_too );

I am not sure if adding an extra parameter randomly like this is a
good idea.  Existing include_sparse is already a single bit that is
stuffed in an int, so it might make sense to change it into a set of
bits (i.e., "unsigned int") in one preliminary patch, and then your
change can borrow another bit in the same flag word.

See the attached patch (not even compile tested, though) for an
illustration of what such a "preliminary clean-up" step to get rid
of the extra include_sparse parameter may look like.

> +++ b/read-cache.c
> @@ -3880,9 +3880,12 @@ void overlay_tree_on_index(struct index_state *istate,
>  
>  struct update_callback_data {
>  	struct index_state *index;
> +	struct repository *repo;
> +	struct pathspec *pathspec;
>  	int include_sparse;
>  	int flags;
>  	int add_errors;
> +	int include_ignored_submodules;
>  };
>  
>  static int fix_unmerged_status(struct diff_filepair *p,
> @@ -3924,7 +3927,48 @@ static void update_callback(struct diff_queue_struct *q,
>  		default:
>  			die(_("unexpected diff status %c"), p->status);
>  		case DIFF_STATUS_MODIFIED:
> -		case DIFF_STATUS_TYPE_CHANGED:
> +		case DIFF_STATUS_TYPE_CHANGED: {
> +			struct stat st;
> +			if (!lstat(path, &st) && S_ISDIR(st.st_mode)) { // only consider submodule if it is a directory

/* Our single liner comment should look like this, not with double-slashes */

The fact that this block has to be so deeply indented strongly
indicates that it should probably become a separate helper function.

I'll stop here for now.



 builtin/add.c      | 8 ++++----
 builtin/checkout.c | 3 +--
 builtin/commit.c   | 2 +-
 read-cache-ll.h    | 6 +++++-
 read-cache.c       | 8 +++-----
 5 files changed, 14 insertions(+), 13 deletions(-)

diff --git c/builtin/add.c w/builtin/add.c
index 32709794b3..49d0199c0b 100644
--- c/builtin/add.c
+++ w/builtin/add.c
@@ -384,7 +384,7 @@ int cmd_add(int argc,
 	int exit_status = 0;
 	struct pathspec pathspec;
 	struct dir_struct dir = DIR_INIT;
-	int flags;
+	unsigned flags;
 	int add_new_files;
 	int require_pathspec;
 	char *seen = NULL;
@@ -485,7 +485,8 @@ int cmd_add(int argc,
 		 (intent_to_add ? ADD_CACHE_INTENT : 0) |
 		 (ignore_add_errors ? ADD_CACHE_IGNORE_ERRORS : 0) |
 		 (!(addremove || take_worktree_changes)
-		  ? ADD_CACHE_IGNORE_REMOVAL : 0));
+		  ? ADD_CACHE_IGNORE_REMOVAL : 0) |
+		 (include_sparse ? ADD_CACHE_INCLUDE_SPARSE : 0));
 
 	if (repo_read_index_preload(repo, &pathspec, 0) < 0)
 		die(_("index file corrupt"));
@@ -583,8 +584,7 @@ int cmd_add(int argc,
 		exit_status |= renormalize_tracked_files(repo, &pathspec, flags);
 	else
 		exit_status |= add_files_to_cache(repo, prefix,
-						  &pathspec, ps_matched,
-						  include_sparse, flags);
+						  &pathspec, ps_matched, flags);
 
 	if (take_worktree_changes && !add_renormalize && !ignore_add_errors &&
 	    report_path_error(ps_matched, &pathspec))
diff --git c/builtin/checkout.c w/builtin/checkout.c
index f9453473fe..766a8e3b66 100644
--- c/builtin/checkout.c
+++ w/builtin/checkout.c
@@ -898,8 +898,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
 			 * entries in the index.
 			 */
 
-			add_files_to_cache(the_repository, NULL, NULL, NULL, 0,
-					   0);
+			add_files_to_cache(the_repository, NULL, NULL, NULL, 0);
 			init_ui_merge_options(&o, the_repository);
 			o.verbosity = 0;
 			work = write_in_core_index_as_tree(the_repository);
diff --git c/builtin/commit.c w/builtin/commit.c
index 0243f17d53..6e42534977 100644
--- c/builtin/commit.c
+++ w/builtin/commit.c
@@ -455,7 +455,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
 		repo_hold_locked_index(the_repository, &index_lock,
 				       LOCK_DIE_ON_ERROR);
 		add_files_to_cache(the_repository, also ? prefix : NULL,
-				   &pathspec, ps_matched, 0, 0);
+				   &pathspec, ps_matched, 0);
 		if (!all && report_path_error(ps_matched, &pathspec))
 			exit(128);
 
diff --git c/read-cache-ll.h w/read-cache-ll.h
index 71b49d9af4..c9311f845b 100644
--- c/read-cache-ll.h
+++ w/read-cache-ll.h
@@ -390,11 +390,15 @@ int remove_index_entry_at(struct index_state *, int pos);
 
 void remove_marked_cache_entries(struct index_state *istate, int invalidate);
 int remove_file_from_index(struct index_state *, const char *path);
+
+/* add_files_to_cache() flags */
 #define ADD_CACHE_VERBOSE 1
 #define ADD_CACHE_PRETEND 2
 #define ADD_CACHE_IGNORE_ERRORS	4
 #define ADD_CACHE_IGNORE_REMOVAL 8
 #define ADD_CACHE_INTENT 16
+#define ADD_CACHE_INCLUDE_SPARSE 32
+
 /*
  * These two are used to add the contents of the file at path
  * to the index, marking the working tree up-to-date by storing
@@ -481,7 +485,7 @@ int cmp_cache_name_compare(const void *a_, const void *b_);
 
 int add_files_to_cache(struct repository *repo, const char *prefix,
 		       const struct pathspec *pathspec, char *ps_matched,
-		       int include_sparse, int flags);
+		       unsigned flags);
 
 void overlay_tree_on_index(struct index_state *istate,
 			   const char *tree_name, const char *prefix);
diff --git c/read-cache.c w/read-cache.c
index 032480d0c7..f32b642446 100644
--- c/read-cache.c
+++ w/read-cache.c
@@ -3881,8 +3881,7 @@ void overlay_tree_on_index(struct index_state *istate,
 
 struct update_callback_data {
 	struct index_state *index;
-	int include_sparse;
-	int flags;
+	unsigned flags;
 	int add_errors;
 };
 
@@ -3917,7 +3916,7 @@ static void update_callback(struct diff_queue_struct *q,
 		struct diff_filepair *p = q->queue[i];
 		const char *path = p->one->path;
 
-		if (!data->include_sparse &&
+		if (!(data->flags & ADD_CACHE_INCLUDE_SPARSE) &&
 		    !path_in_sparse_checkout(path, data->index))
 			continue;
 
@@ -3946,7 +3945,7 @@ static void update_callback(struct diff_queue_struct *q,
 
 int add_files_to_cache(struct repository *repo, const char *prefix,
 		       const struct pathspec *pathspec, char *ps_matched,
-		       int include_sparse, int flags)
+		       unsigned flags)
 {
 	struct odb_transaction *transaction;
 	struct update_callback_data data;
@@ -3954,7 +3953,6 @@ int add_files_to_cache(struct repository *repo, const char *prefix,
 
 	memset(&data, 0, sizeof(data));
 	data.index = repo->index;
-	data.include_sparse = include_sparse;
 	data.flags = flags;
 
 	repo_init_revisions(repo, &rev, prefix);

static int ignore_add_errors, intent_to_add, ignore_missing;
static int warn_on_embedded_repo = 1;
static int include_ignored_submodules;

#define ADDREMOVE_DEFAULT 1
static int addremove = ADDREMOVE_DEFAULT;
Expand Down Expand Up @@ -271,6 +272,7 @@ static struct option builtin_add_options[] = {
OPT_BOOL( 0 , "ignore-errors", &ignore_add_errors, N_("just skip files which cannot be added because of errors")),
OPT_BOOL( 0 , "ignore-missing", &ignore_missing, N_("check if - even missing - files are ignored in dry run")),
OPT_BOOL(0, "sparse", &include_sparse, N_("allow updating entries outside of the sparse-checkout cone")),
OPT_BOOL(0, "include-ignored-submodules", &include_ignored_submodules, N_("add submodules even if they has configuration ignore=all")),
OPT_STRING(0, "chmod", &chmod_arg, "(+|-)x",
N_("override the executable bit of the listed files")),
OPT_HIDDEN_BOOL(0, "warn-embedded-repo", &warn_on_embedded_repo,
Expand Down Expand Up @@ -582,7 +584,7 @@ int cmd_add(int argc,
else
exit_status |= add_files_to_cache(repo, prefix,
&pathspec, ps_matched,
include_sparse, flags);
include_sparse, flags, include_ignored_submodules);

if (take_worktree_changes && !add_renormalize && !ignore_add_errors &&
report_path_error(ps_matched, &pathspec))
Expand Down
2 changes: 1 addition & 1 deletion builtin/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
*/

add_files_to_cache(the_repository, NULL, NULL, NULL, 0,
0);
0, 0 );
init_ui_merge_options(&o, the_repository);
o.verbosity = 0;
work = write_in_core_index_as_tree(the_repository);
Expand Down
2 changes: 1 addition & 1 deletion builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ static const char *prepare_index(const char **argv, const char *prefix,
repo_hold_locked_index(the_repository, &index_lock,
LOCK_DIE_ON_ERROR);
add_files_to_cache(the_repository, also ? prefix : NULL,
&pathspec, ps_matched, 0, 0);
&pathspec, ps_matched, 0, 0, 0 );
if (!all && report_path_error(ps_matched, &pathspec))
exit(128);

Expand Down
2 changes: 1 addition & 1 deletion read-cache-ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ int cmp_cache_name_compare(const void *a_, const void *b_);

int add_files_to_cache(struct repository *repo, const char *prefix,
const struct pathspec *pathspec, char *ps_matched,
int include_sparse, int flags);
int include_sparse, int flags, int ignored_too );

void overlay_tree_on_index(struct index_state *istate,
const char *tree_name, const char *prefix);
Expand Down
54 changes: 52 additions & 2 deletions read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
#include "csum-file.h"
#include "promisor-remote.h"
#include "hook.h"
#include "submodule.h"
#include "submodule-config.h"

/* Mask for the name length in ce_flags in the on-disk index */

Expand Down Expand Up @@ -3880,9 +3882,12 @@ void overlay_tree_on_index(struct index_state *istate,

struct update_callback_data {
struct index_state *index;
struct repository *repo;
struct pathspec *pathspec;
int include_sparse;
int flags;
int add_errors;
int include_ignored_submodules;
};

static int fix_unmerged_status(struct diff_filepair *p,
Expand Down Expand Up @@ -3924,13 +3929,55 @@ static void update_callback(struct diff_queue_struct *q,
default:
die(_("unexpected diff status %c"), p->status);
case DIFF_STATUS_MODIFIED:
case DIFF_STATUS_TYPE_CHANGED:
case DIFF_STATUS_TYPE_CHANGED: {
struct stat st;
if (!lstat(path, &st) && S_ISDIR(st.st_mode)) { // only consider submodule if it is a directory
const struct submodule *sub = submodule_from_path(data->repo, null_oid(the_hash_algo), path);
if (sub && sub->name && sub->ignore && !strcmp(sub->ignore, "all")) {
int pathspec_matches = 0;
char *norm_pathspec = NULL;
int ps_i;
trace_printf("ignore=all %s\n", path);
trace_printf("pathspec %s\n",
(data->pathspec && data->pathspec->nr) ? "has pathspec" : "no pathspec");
/* Safely scan all pathspec items (q->nr may exceed pathspec->nr). */
if (data->pathspec) {
for (ps_i = 0; ps_i < data->pathspec->nr; ps_i++) {
const char *m = data->pathspec->items[ps_i].match;
if (!m)
continue;
norm_pathspec = xstrdup(m);
strip_dir_trailing_slashes(norm_pathspec);
if (!strcmp(path, norm_pathspec)) {
pathspec_matches = 1;
FREE_AND_NULL(norm_pathspec);
break;
}
FREE_AND_NULL(norm_pathspec);
}
}
if (pathspec_matches) {
if (data->include_ignored_submodules && data->include_ignored_submodules > 0) {
trace_printf("Add submodule due to --include_ignored_submodules: %s\n", path);
} else {
printf(_("Skipping submodule due to ignore=all: %s"), path);
printf(_("Use --include_ignored_submodules, if you really want to add them.") );
continue;
}
} else {
/* No explicit pathspec match -> skip silently (or with trace). */
trace_printf("Pathspec to submodule does not match explicitly: %s\n", path);
continue;
}
}
}
if (add_file_to_index(data->index, path, data->flags)) {
if (!(data->flags & ADD_CACHE_IGNORE_ERRORS))
die(_("updating files failed"));
data->add_errors++;
}
break;
}
case DIFF_STATUS_DELETED:
if (data->flags & ADD_CACHE_IGNORE_REMOVAL)
break;
Expand All @@ -3945,7 +3992,7 @@ static void update_callback(struct diff_queue_struct *q,

int add_files_to_cache(struct repository *repo, const char *prefix,
const struct pathspec *pathspec, char *ps_matched,
int include_sparse, int flags)
int include_sparse, int flags, int include_ignored_submodules )
{
struct update_callback_data data;
struct rev_info rev;
Expand All @@ -3954,6 +4001,9 @@ int add_files_to_cache(struct repository *repo, const char *prefix,
data.index = repo->index;
data.include_sparse = include_sparse;
data.flags = flags;
data.repo = repo;
data.include_ignored_submodules = include_ignored_submodules;
data.pathspec = (struct pathspec *)pathspec;

repo_init_revisions(repo, &rev, prefix);
setup_revisions(0, NULL, &rev, NULL);
Expand Down
6 changes: 3 additions & 3 deletions t/lib-submodule-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ create_lib_submodule_repo () {
git commit -m "modified file2 and added file3" &&
git push origin modifications
) &&
git add sub1 &&
git add --include-ignored-submodules sub1 &&
git commit -m "Modify sub1" &&

git checkout -b add_nested_sub modify_sub1 &&
git -C sub1 checkout -b "add_nested_sub" &&
git -C sub1 submodule add --branch no_submodule ../submodule_update_sub2 sub2 &&
git -C sub1 commit -a -m "add a nested submodule" &&
git add sub1 &&
git add --include-ignored-submodules sub1 &&
git commit -a -m "update submodule, that updates a nested submodule" &&
git checkout -b modify_sub1_recursively &&
git -C sub1 checkout -b modify_sub1_recursively &&
Expand All @@ -112,7 +112,7 @@ create_lib_submodule_repo () {
git -C sub1/sub2 commit -m "make a change in nested sub" &&
git -C sub1 add sub2 &&
git -C sub1 commit -m "update nested sub" &&
git add sub1 &&
git add --include-ignored-submodules sub1 &&
git commit -m "update sub1, that updates nested sub" &&
git -C sub1 push origin modify_sub1_recursively &&
git -C sub1/sub2 push origin modify_sub1_recursively &&
Expand Down
Loading
Loading