Skip to main content
question clarification
Source Link
cloaked1
  • 331
  • 2
  • 11

how to see tags for all commits in git-log <tag1>..<tag2>from range of tags

I'm creating a changelog generator that works for our specific use-case. It seems

If I'm understanding how git works, when I git log <tag> or git log <tag1>..<tag2> (or use ...) the returned set inherently belongs to that or those tags respectively. OK, assuming I'm right, that's fine. The problem is a couple of things, though.

If I use git- log <tag>, git doesn't show an owningjust return a set of commits for that tag. It returns commits for that tag if that tag is the first tag of that tag pattern or all commits belongingfor all tags from the requested tag up to athe first tag matching pattern. How doAnd that's OK IF I get the related owningcan attribute to what tag each commit belongs, but I can't it seems. This seems to be the biggest hodge-podge of allgit in my opinion. There doesn't seem to be an explicit way of relating commits belonging to a specific tag?, unless I'm just not doing this the right way.

I've tried using several methods to include implementations of libgit2 in code I've written and apps others have written. I've concluded that it's simply best to just rely on the system git command, which still misbehaves in my opinion:

git log --merges --decorate=full --pretty=format:%H [some tag argumentsor potentiallytag optional]range]

per hash I do the following:

git show $hash -s --decorate

I may get refs and I may not. I'm assuming that if I ask for reviewing merge commits with tags then every commit should be attributed to a tag, right?I'm also using a template to capture things that don't show in the default output to include refs from %D -- sometimes refs is empty, which doesn't make sense because I'm pulling the commit hash from a tag range! This behavior doesn't make sense at all!

If that is the case,It seems that means I should be able to relate every commit from a git log <tag> to its constituent tag. How do I make sure that my log output always shows the tag (s) to which a commit belongs?

how to see tags for all commits in git-log <tag1>..<tag2>

I'm creating a changelog generator that works for our specific use-case. It seems that git-log doesn't show an owning tag for all commits belonging to a tag. How do I get the related owning tag of all commits belonging to a tag?

git log --merges --decorate=full --pretty=format:%H [some tag arguments potentially optional]

per hash I do the following:

git show $hash -s

I may get refs and I may not. I'm assuming that if I ask for reviewing merge commits with tags then every commit should be attributed to a tag, right?

If that is the case, that means I should be able to relate every commit to its constituent tag. How do I make sure that my log output always shows the tag (s) to which a commit belongs?

how to see tags for all commits in git-log from range of tags

I'm creating a changelog generator that works for our specific use-case.

If I'm understanding how git works, when I git log <tag> or git log <tag1>..<tag2> (or use ...) the returned set inherently belongs to that or those tags respectively. OK, assuming I'm right, that's fine. The problem is a couple of things, though.

If I use git log <tag>, git doesn't just return a set of commits for that tag. It returns commits for that tag if that tag is the first tag of that tag pattern or all commits for all tags from the requested tag up to the first tag matching pattern. And that's OK IF I can attribute to what tag each commit belongs, but I can't it seems. This seems to be the biggest hodge-podge of git in my opinion. There doesn't seem to be an explicit way of relating commits to a specific tag, unless I'm just not doing this the right way.

I've tried using several methods to include implementations of libgit2 in code I've written and apps others have written. I've concluded that it's simply best to just rely on the system git command, which still misbehaves in my opinion:

git log --merges --decorate=full --pretty=format:%H [some tag or tag range]

per hash I do the following:

git show $hash -s --decorate

I'm also using a template to capture things that don't show in the default output to include refs from %D -- sometimes refs is empty, which doesn't make sense because I'm pulling the commit hash from a tag range! This behavior doesn't make sense at all!

It seems that I should be able to relate every commit from a git log <tag> to its constituent tag. How do I make sure that my log output always shows the tag (s) to which a commit belongs?

disambiguation and better titling
Source Link
cloaked1
  • 331
  • 2
  • 11

how to see tags for all commits in git-log <tag1>..<tag2>; see tag(s) to which all commits belong<tag2>

I have been trying to figure this out for a long time and I'm at a loss.

I'm creating a changelog generator that works for our specific use-case. Essentially, I'm building the changelog fromIt seems that git-log doesn't show an owning tag for all commits belonging to tagsa tag. The problem is that when IHow do something like:I get the related owning tag of all commits belonging to a tag?

git log --merges --decorate=full --pretty=format:%H [some tag arguments potentially optional]

per hash I do the following:

git show $hash -s

I may get refs and I may not. I'm assuming that if I ask for reviewing merge commits with tags then every commit should be attributed to a tag, right?

If that is the case, that means I should be able to relate every commit to its constituent tag. How do I make sure that my log output always shows the tag (s) to which a commit belongs?

git-log <tag1>..<tag2>; see tag(s) to which all commits belong

I have been trying to figure this out for a long time and I'm at a loss.

I'm creating a changelog generator that works for our specific use-case. Essentially, I'm building the changelog from commits belonging to tags. The problem is that when I do something like:

git log --merges --decorate=full --pretty=format:%H [some tag arguments potentially optional]

per hash I do the following:

git show $hash -s

I may get refs and I may not. I'm assuming that if I ask for reviewing merge commits with tags then every commit should be attributed to a tag, right?

If that is the case, that means I should be able to relate every commit to its constituent tag. How do I make sure that my log output always shows the tag (s) to which a commit belongs?

how to see tags for all commits in git-log <tag1>..<tag2>

I'm creating a changelog generator that works for our specific use-case. It seems that git-log doesn't show an owning tag for all commits belonging to a tag. How do I get the related owning tag of all commits belonging to a tag?

git log --merges --decorate=full --pretty=format:%H [some tag arguments potentially optional]

per hash I do the following:

git show $hash -s

I may get refs and I may not. I'm assuming that if I ask for reviewing merge commits with tags then every commit should be attributed to a tag, right?

If that is the case, that means I should be able to relate every commit to its constituent tag. How do I make sure that my log output always shows the tag (s) to which a commit belongs?

Source Link
cloaked1
  • 331
  • 2
  • 11

git-log <tag1>..<tag2>; see tag(s) to which all commits belong

I have been trying to figure this out for a long time and I'm at a loss.

I'm creating a changelog generator that works for our specific use-case. Essentially, I'm building the changelog from commits belonging to tags. The problem is that when I do something like:

git log --merges --decorate=full --pretty=format:%H [some tag arguments potentially optional]

per hash I do the following:

git show $hash -s

I may get refs and I may not. I'm assuming that if I ask for reviewing merge commits with tags then every commit should be attributed to a tag, right?

If that is the case, that means I should be able to relate every commit to its constituent tag. How do I make sure that my log output always shows the tag (s) to which a commit belongs?