On Tue, Dec 13, 2022 at 08:47:49PM -0800, Graham Menhennitt wrote:

> Our development workflow consists of:
> 
> Developer:
> 
>    - creates private branch off project’s ‘develop’ branch
>    - develops feature or fixes bug on private branch
>    - merges private branch to ‘develop’ branch
>    - creates tag on merge commit identifying feature/bug
> 
> Project lead:
> 
>    - merges project’s ‘develop’ branch to project’s ‘release’ branch
>    - builds release from ‘release’ branch
>    - creates tag on ‘release’ branch to identify release
> 
> We want to be able to give our test team a list of the features/bug fixes 
> in the new release. As such, I want to get list of tags on commits that 
> have been merged to the project’s ‘release’ branch. I want it restricted to 
> tags contained in the new release tag, but not contained in the previous 
> release tag. I want the list to exclude tags on other projects i.e. that 
> have not been merged to this project’s ‘release’ branch.
> 
> So, if this project’s ‘release’ branch is X. The previous release is Y and 
> the new release is Z. I want a list of tags attached to commits that were 
> merged to X between Y and Z.

The closest thing I've been able to come up with is

  git rev-list --pretty='format:%D' Z ^Y | grep ^tag:

Which basically means:

 * Traverse the subgraph of the repository's commits reachable from commit
   tagged by Z...

 * ...But exclude any commits also reachable from Y, and...

 * For those commits which are referenced (have a branch or a tag pointing
   at them, or both, or multiple) output them as well.

 * The output is then filtered to contain only the tags.


Note that the branches are irrelevant for traversing. You can use branches to
refer to commits, but any way to refer to them would do; the traversal process
itself is only concerned with commits.


You might need to further refine the incantation but this should be a start.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/20221215184044.2g3k5rvvldkycvnt%40carbon.

Reply via email to