Skip to content
This repository was archived by the owner on Feb 2, 2026. It is now read-only.
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
16 changes: 8 additions & 8 deletions onyo/lib/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def onyo_mkdir(inventory: Inventory,
for op in inventory.operations
if op.operator == OPERATIONS_MAPPING['new_directories']]))
message = inventory.repo.generate_commit_subject(
format_string="mkdir [{len}]: {operation_paths}\n",
format_string="mkdir [{len}]: {operation_paths}",
len=len(operation_paths),
operation_paths=sorted(operation_paths)) + (message or "")

Expand Down Expand Up @@ -820,10 +820,10 @@ def onyo_mv(inventory: Inventory,

inline_diff = inline_path_diff(operation_paths[0], dest)
ln = len(operation_paths)
message = f"{subject_prefix} [{ln}]: {inline_diff}\n" + (message or "")
message = f"{subject_prefix} [{ln}]: {inline_diff}\n\n" + (message or "")
else: # multi-source moves
message = inventory.repo.generate_commit_subject(
format_string="{prefix} [{ln}]: {operation_paths} -> {destination}\n",
format_string="{prefix} [{ln}]: {operation_paths} -> {destination}",
prefix=subject_prefix,
ln=len(operation_paths),
operation_paths=operation_paths,
Expand Down Expand Up @@ -968,7 +968,7 @@ def onyo_new(inventory: Inventory,
for op in inventory.operations
if op.operator == OPERATIONS_MAPPING['new_assets']]))
message = inventory.repo.generate_commit_subject(
format_string="new [{len}]: {operation_paths}\n",
format_string="new [{len}]: {operation_paths}",
len=len(operation_paths),
operation_paths=operation_paths) + (message or "")
inventory.commit(message=message)
Expand Down Expand Up @@ -1034,7 +1034,7 @@ def onyo_rm(inventory: Inventory,
if op.operator == OPERATIONS_MAPPING['remove_assets'] or
op.operator == OPERATIONS_MAPPING['remove_directories']]))
message = inventory.repo.generate_commit_subject(
format_string="rm [{len}]: {operation_paths}\n",
format_string="rm [{len}]: {operation_paths}",
len=len(operation_paths),
operation_paths=operation_paths) + (message or "")
inventory.commit(message)
Expand Down Expand Up @@ -1093,7 +1093,7 @@ def onyo_rmdir(inventory: Inventory,
for op in inventory.operations
if op.operator == OPERATIONS_MAPPING['remove_directories']]))
message = inventory.repo.generate_commit_subject(
format_string="rmdir [{len}]: {operation_paths}\n",
format_string="rmdir [{len}]: {operation_paths}",
len=len(operation_paths),
operation_paths=sorted(operation_paths)) + (message or "")

Expand Down Expand Up @@ -1175,7 +1175,7 @@ def onyo_set(inventory: Inventory,
for op in inventory.operations
if op.operator == OPERATIONS_MAPPING['modify_assets']]))
message = inventory.repo.generate_commit_subject(
format_string="set [{len}] ({keys}): {operation_paths}\n",
format_string="set [{len}] ({keys}): {operation_paths}",
len=len(operation_paths),
keys=list(keys.keys()),
operation_paths=operation_paths) + (message or "")
Expand Down Expand Up @@ -1451,7 +1451,7 @@ def onyo_unset(inventory: Inventory,
if op.operator == OPERATIONS_MAPPING[
'modify_assets']]))
message = inventory.repo.generate_commit_subject(
format_string="unset [{len}] ({keys}): {operation_paths}\n",
format_string="unset [{len}] ({keys}): {operation_paths}",
len=len(operation_paths),
keys=keys,
operation_paths=operation_paths) + (message or "")
Expand Down
4 changes: 2 additions & 2 deletions onyo/lib/onyo.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def generate_commit_subject(format_string: str,

message = format_string.format(**shortened_kwargs)
if len(message) < max_length:
return message
return message + '\n\n'

# shorter message: highest level (e.g. dir or asset name)
shortened_kwargs = {}
Expand All @@ -353,7 +353,7 @@ def generate_commit_subject(format_string: str,
shortened_kwargs[key] = str(value)

message = format_string.format(**shortened_kwargs)
return message
return message + '\n\n'

@property
def asset_paths(self) -> list[Path]:
Expand Down