Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add list subcommand #4

Open
gdemonet opened this issue Jan 11, 2021 · 1 comment
Open

Add list subcommand #4

gdemonet opened this issue Jan 11, 2021 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@gdemonet
Copy link

gdemonet commented Jan 11, 2021

The command-line tool defined in #3 should first have sufficient capabilities to extract the list of changelog fragments from Git history.
For this purpose, we want to add a list subcommand, with the following behaviour:

  • list --in X.Y.Z would return all fragments included before the X.Y.Z tag but after the most recent tag that comes before it (in terms of Git history)
  • list --from A.B.C --to D.E.F would return fragments added after A.B.C and before D.E.F
  • list --from X.Y.Z would return fragments added after X.Y.Z up to the current HEAD
  • list would return fragments added after the most recent tag

This subcommand would output filenames at first, additional output formats could be added in the future (e.g. showing in which version such file was added, the date of first addition, of last modification, ...)

@NicolasT
Copy link
Contributor

I was looking at implementing this, and it occurred to me we could do this somewhat differently, more alike how git diff etc. work. Basically:

  • changelog-binder list is as you describe without options (somewhat like git diff in a tree, diff from last commit to working tree)
  • changelog-binder list X.Y.Z would be as-if --from X.Y.Z is used (somewhat like git diff ref1, diff between given ref and working tree)
  • changelog-binder list A.B.C...D.E.F would be as-if --from A.B.C --to D.E.F is used (somewhat like git diff ref1...ref2, diff between ref1 and ref2)

The --in variant could be something like changelog-binder list X.Y.Z^...X.Y.Z

Basically, we treat version strings as Git treats commit refs.

NicolasT added a commit that referenced this issue Feb 2, 2021
NicolasT added a commit that referenced this issue Feb 2, 2021
NicolasT added a commit that referenced this issue Feb 2, 2021
@NicolasT NicolasT added the enhancement New feature or request label Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants