Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/git_nested/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def build_commit_message(
commit = git.check_output(['rev-parse', '--short', nested_commit_ref])
message = textwrap.dedent(
f"""\
git nested {command}
git nested {command} {subdir.as_posix()}

nested:
subdir: "{subdir.as_posix()}"
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/scenarios/test_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_usual_contribution(foo_bar_cloned_and_nested):
author_email='foo@foo',
committer_name='FooUser',
committer_email='foo@foo',
commit_title='git nested pull',
commit_title='git nested pull bar',
changed_files=['bar/.gitnested', 'bar/FirstBar', 'bar/SecondBar'],
)

Expand Down Expand Up @@ -82,7 +82,7 @@ def test_usual_contribution(foo_bar_cloned_and_nested):
author_email='foo@foo',
committer_name='FooUser',
committer_email='foo@foo',
commit_title='git nested pull',
commit_title='git nested pull bar',
changed_files=[],
)
assert_commit(
Expand Down Expand Up @@ -155,7 +155,7 @@ def test_usual_contribution(foo_bar_cloned_and_nested):
author_email='foo@foo',
committer_name='FooUser',
committer_email='foo@foo',
commit_title='git nested pull',
commit_title='git nested pull bar',
changed_files=['bar/.gitnested', 'bar/SecondBar', 'bar/ThirdBar'],
)

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_pull_stops_at_a_patch_that_does_not_apply(foo_bar_cloned_and_nested):
assert cmd_git_nested('patches verify bar', cwd=foo).output.strip().endswith(" with 1 patch")
# The commit finishes the pull, so its message is the pull's
message = env.run(['git', 'log', '-1', '--format=%B'], cwd=foo).stdout
assert message.startswith("git nested pull\n")
assert message.startswith("git nested pull bar\n")
assert "Upstream commits:\n- " in message
assert "upstream Bar" in message

Expand Down
10 changes: 5 additions & 5 deletions tests/e2e/test_pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_pull(prepare_pull_test):
# Check commit messages
foo_new_commit_message = git_get_commit_msg(env.workspace / 'foo').strip()
assert foo_new_commit_message == textwrap.dedent(f'''\
git nested pull
git nested pull bar

nested:
subdir: "bar"
Expand Down Expand Up @@ -216,7 +216,7 @@ def test_pull_conflict(prepare_pull_test):
upstream_log = env.run(['git', 'log', '-1', '--format=%h %s'], cwd=env.workspace / 'bar').stdout.strip()
# The commit finishes the pull, so its message is the pull's
assert foo_new_commit_message == textwrap.dedent(f'''\
git nested pull
git nested pull bar

nested:
subdir: "bar"
Expand Down Expand Up @@ -576,7 +576,7 @@ def test_pull_rebase(prepare_pull_test):
foo_new_commit_message = git_get_commit_msg(env.workspace / 'foo').strip()
bar_head_commit_short = git_rev_parse(['--short', bar_head_commit], cwd=env.workspace / 'foo')
assert foo_new_commit_message == textwrap.dedent(f'''\
git nested pull
git nested pull bar

nested:
subdir: "bar"
Expand Down Expand Up @@ -653,7 +653,7 @@ def test_commit_after_a_rebase_conflict_says_pull(prepare_pull_test):
cmd_git_nested('commit bar', cwd=foo)

message = git_get_commit_msg(foo)
assert message.startswith("git nested pull\n")
assert message.startswith("git nested pull bar\n")
upstream_log = env.run(['git', 'log', '-1', '--format=%h %s'], cwd=env.workspace / 'bar').stdout.strip()
assert f"Upstream commits:\n- {upstream_log}" in message

Expand All @@ -669,7 +669,7 @@ def test_commit_without_a_stopped_pull_says_commit(prepare_pull_test):
env.run(['git', 'commit', '-qm', 'add Local'], cwd=worktree_dir)
cmd_git_nested('commit bar', cwd=foo)

assert git_get_commit_msg(foo).startswith("git nested commit\n")
assert git_get_commit_msg(foo).startswith("git nested commit bar\n")


def test_pull_with_force(prepare_pull_test):
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_nested_push(foo_bar_cloned_and_nested):
author_name='PushUser',
committer_email='push@push',
committer_name='PushUser',
commit_title='git nested pull',
commit_title='git nested pull bar',
changed_files=[],
)
assert_commit(
Expand Down
Loading