From: <stefan.naewe@atlas-elektronik.com>
To: <git@vger.kernel.org>
Subject: Zombie tag
Date: Thu, 21 Jan 2016 09:17:28 +0100 [thread overview]
Message-ID: <56A09418.1070201@atlas-elektronik.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]
I'm having trouble to get rid of a deleted tag.
Here's what I did:
- push master branch from a non-bare repo (R1) into a bare repo (B1)
- push a tag (tag-a) from R1 into the same B1
- force-push master from another non-bare repo (R2) into B1
- do 'git push B1 :tag-a' from R2 to delete the tag
Now, in B1, 'git fsck' shows a dangling tag that can be identified
as 'tag-a' from above. There's obviously no reflog in B1.
I don't know how to get rid of that tag.
A cleaned-up 'script' session of the above is attached.
The problem initially occurred on Windows with git 2.7.0 but could
be reproduced on a Linux machine with git 2.7.0.
What's going on here ?
Thanks,
Stefan
--
----------------------------------------------------------------
/dev/random says: Polls show that 9 out of 6 schizophrenics agree.
python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')"
GPG Key fingerprint = 2DF5 E01B 09C3 7501 BCA9 9666 829B 49C5 9221 27AF
[-- Attachment #2: zombie-tag.typescript --]
[-- Type: text/plain, Size: 4733 bytes --]
~/tmp/zombie-tag ~
$ git init repo1
Initialized empty Git repository in /home/naewe_s/tmp/zombie-tag/repo1/.git/
$ git init repo2
Initialized empty Git repository in /home/naewe_s/tmp/zombie-tag/repo2/.git/
$ git init --bare bare1.git
Initialized empty Git repository in /home/naewe_s/tmp/zombie-tag/bare1.git/
$ cd repo1
$ echo A > A ; git add A ; git commit -m"add A"
[master (root-commit) d9e5baf] add A
1 file changed, 1 insertion(+)
create mode 100644 A
$ echo B > B ; git add B ; git commit -m"add B"
[master 3810738] add B
1 file changed, 1 insertion(+)
create mode 100644 B
$ git tag -m"initial" initial\r$ git push ../bare1.git/ master initial
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 25% (1/4) \rCompressing objects: 50% (2/4) \rCompressing objects: 75% (3/4) \rCompressing objects: 100% (4/4) \rCompressing objects: 100% (4/4), done.
Writing objects: 14% (1/7) \rWriting objects: 28% (2/7) \rWriting objects: 42% (3/7) \rWriting objects: 57% (4/7) \rWriting objects: 71% (5/7) \rWriting objects: 85% (6/7) \rWriting objects: 100% (7/7) \rWriting objects: 100% (7/7), 548 bytes | 0 bytes/s, done.
Total 7 (delta 1), reused 0 (delta 0)
To ../bare1.git
* [new branch] master -> master
* [new tag] initial -> initial
$ cd ../repo2
$ for n in 1 2; do echo $n > $n ; git add $n; git commit -m"add $n"; done
[master (root-commit) e2ebcc4] add 1
1 file changed, 1 insertion(+)
create mode 100644 1
[master f8d1071] add 2
1 file changed, 1 insertion(+)
create mode 100644 2
$ git push -f ../bare1.git/ master
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 33% (1/3) \rCompressing objects: 66% (2/3) \rCompressing objects: 100% (3/3) \rCompressing objects: 100% (3/3), done.
Writing objects: 16% (1/6) \rWriting objects: 33% (2/6) \rWriting objects: 50% (3/6) \rWriting objects: 66% (4/6) \rWriting objects: 83% (5/6) \rWriting objects: 100% (6/6) \rWriting objects: 100% (6/6), 384 bytes | 0 bytes/s, done.
Total 6 (delta 1), reused 0 (delta 0)
To ../bare1.git
+ 3810738...f8d1071 master -> master (forced update)
$ git push ../bare1.git/ :initial
To ../bare1.git
- [deleted] initial
$ cd ../bare1.git/
$ git log --oneline
f8d1071 add 2
e2ebcc4 add 1
\r$ git for-each-ref
f8d10716fc887da36df53f58660bfaa77ff5a411 commit refs/heads/master
$ git fsck
Checking object directories: 5% (13/256) \rChecking object directories: 11% (30/256) \rChecking object directories: 13% (35/256) \rChecking object directories: 22% (57/256) \rChecking object directories: 53% (137/256) \rChecking object directories: 81% (209/256) \rChecking object directories: 83% (213/256) \rChecking object directories: 85% (218/256) \rChecking object directories: 87% (223/256) \rChecking object directories: 88% (227/256) \rChecking object directories: 96% (246/256) \rChecking object directories: 97% (249/256) \rChecking object directories: 100% (256/256) \rChecking object directories: 100% (256/256), done.
dangling tag 88a23db671d20eb6a4384207bf24b8e0c667a288
dangling commit 381073887a81082128b84945fe07c96c400e86da
$ git show 88a23db671d20e
tag initial
Tagger: Stefan Naewe <stefan.naewe@xyz.com>
Date: Thu Jan 21 08:51:05 2016 +0100
initial
commit d9e5baf52f472c49fd4fd1faeb6f0752dfe3980b
Author: Stefan Naewe <stefan.naewe@xyz.com>
Date: Thu Jan 21 08:50:41 2016 +0100
add A
diff --git a/A b/A
new file mode 100644
index 0000000..f70f10e
--- /dev/null
+++ b/A
@@ -0,0 +1 @@
+A
\r$ git reflog
$ git gc
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 33% (1/3) \rCompressing objects: 66% (2/3) \rCompressing objects: 100% (3/3) \rCompressing objects: 100% (3/3), done.
Writing objects: 16% (1/6) \rWriting objects: 33% (2/6) \rWriting objects: 50% (3/6) \rWriting objects: 66% (4/6) \rWriting objects: 83% (5/6) \rWriting objects: 100% (6/6) \rWriting objects: 100% (6/6), done.
Total 6 (delta 1), reused 0 (delta 0)
$ git fsck
Checking object directories: 11% (30/256) \rChecking object directories: 13% (35/256) \rChecking object directories: 22% (57/256) \rChecking object directories: 53% (137/256) \rChecking object directories: 85% (218/256) \rChecking object directories: 96% (246/256) \rChecking object directories: 100% (256/256) \rChecking object directories: 100% (256/256), done.
Checking objects: 0% (0/6) \rChecking objects: 100% (6/6) \rChecking objects: 100% (6/6), done.
dangling tag 88a23db671d20eb6a4384207bf24b8e0c667a288
dangling commit 381073887a81082128b84945fe07c96c400e86da
next reply other threads:[~2016-01-21 8:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 8:17 stefan.naewe [this message]
2016-01-21 14:48 ` Zombie tag stefan.naewe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56A09418.1070201@atlas-elektronik.com \
--to=stefan.naewe@atlas-elektronik.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).