git <tag> --fubar

Andrew Edwards via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 13 09:12:01 PDT 2014


On Sunday, 13 July 2014 at 10:06:37 UTC, Johannes Pfau wrote:
> Am Sun, 13 Jul 2014 00:27:53 +0000
> schrieb "Andrew Edwards" <ridimz at yahoo.com>:
>
>
>> I had some issues keeping things straight in my head about 
>> which repo I visited, which branch I checkout and which ones I 
>> tagged. So I decided to automate the process. Starting with 
>> v2.066.0-b3 every repo gets tagged correctly and the tag gets 
>> pushed automatically to master. I'm in nirvana. No more 
>> forgetting to tag things or tagging them in the wrong places.
>> 
>> The problem? I screwed up the v2.066.0-b1 tags by placing them 
>> in master instead of the 2.066 branch. So when I build the 
>> binaries from v2.066.0-b3, it's ignoring changes in the branch.
>
> Then delete the v2.066.0-b1 tag and recreate it, as explained 
> below.
> (You'll have to know the commit sha1 that's actually used to 
> build
> v2.066.0-b1)
>
>> 
>> To make matters worse, after visiting both branch and master 
>> for all repos, everyone exhibited the same problem with the 
>> exception of tools. Tools did not have the v2.066.0-b3 tag and 
>> showed the same tag in both master and the branch. I tried 
>> removing the tag from master to match the rest of the repos 
>> but that did not work, it simply removed all references to the 
>> tag.
>
> ?
> tags are not _on_ branches. if you tag a commit which is in 
> multiple
> branches then it might seem like you have a tag on multiple 
> branches,
> but you can only tag commits. That's a crucial point, you never 
> tag
> branches, or commits _on_ branches, you can only tag commits!

Completely, understand. Since I do not provide a commit hash, and 
since I'm tagging from the branch, whatever is at the head of the 
branch is the commit that gets tagged. Here is my problem, after 
removing v2.066.0-b3 and v2.066.0-b2, if I run "git describe 
--tag", I get the following:

      dmd
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1-74-g8f3af62
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b1-29-g2b79556

      druntime
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1-31-gb0920b6
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b1-14-gd8fc4a0

      phobos
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1-71-g1e9c457
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b1-15-g02c8b31

      installer
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1-34-g9f411e2
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b1-11-gb8aa5c0

      dlang.org
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1-15-gd31f436
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b1

      tools
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b1

After adding back the v2.066.0-b3 tag, I get this:

      dmd
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1-80-ga721850
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b3

      druntime
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1-34-gc679110
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b3

      phobos
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1-78-g5a021a7
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b3

      installer
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b1-34-g9f411e2
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b3

      dlang.org
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b3-15-gd31f436
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b3

      tools
      Switched to branch 'master'
      Your branch is up-to-date with 'origin/master'.
      v2.066.0-b3
      Switched to branch '2.066'
      Your branch is up-to-date with 'origin/2.066'.
      v2.066.0-b3

This was exactly how things looked to me when I created the B3 
binaries (with the exception of tools which only had tags for 
B2), however Kenji Hara reports that there are changes in the 
branch that do not exist in the binaries. I do not understand why 
since I created all the tags using the same process. The only 
difference is that instead of typing them one by one, I put the 
commands in a script so I don't forget anything.

I guess my problem is not a lack of resources (books/links) or 
basic understanding of them, but rather not being able to 
understand how commits in the branch do not make it into the 
binaries.


More information about the Digitalmars-d mailing list