E3SM-Project / E3SM-Project/zstash

[Feature]: Add `include-parent-in-path` parameter

Open
#345 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
10
Avg merge
14h 18m
Merged PRs (30d)
1

Description

### How will this affect the next version number?

New feature (increment MINOR version)

### Is your feature request related to a problem?

@TonyB9000 ran into this issue: if someone were to “zstash extract” any two archives in the same PWD, the extracted files would clobber one another – because while they are distinguished by archive-NAME, they are not distinguished by archive-PATH within the archive.

### Describe the solution you'd like

@TonyB9000's suggestion: a special zstash flag “—include-parent-in-path”, so that if hist-BCRC were the target directory, the archived file paths would begin with that value (especially if “—cache ” is supplied). That would require zstash to “cd” up one directory and prefix the target basename to every supplied pattern.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the zstash extract command and how the --cache option determines extracted paths. Confirm how supplied patterns and the target directory are handled, then verify that --include-parent-in-path prevents files from two archives extracted in the same PWD from clobbering one another.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.