top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

deletion of branch seems to modify tag as well in git...

0 votes
261 views

$ git push origin :ABRANCHNAME
remote: Firing Pre - receive hook
remote:
remote:
remote: Firing Post receive hook
remote:
remote: Branch is ABRANCHNAME -- not creating Trigger file since this is not _int branch
remote: error: Trying to write ref refs/tags/ABRANCHNAME!SN-BL-20130605_100513_04363 with nonexistent object 0000000000000000000000000000000000000000
remote: fatal: refs/tags/ABRANCHNAME!SN-BL-20130605_100513_04363: cannot update the ref
To ssh://git@ourgitserver/repositoryname.git
- [deleted] ABRANCHNAME

I would not expect this behavior. Is git attempting to modify the tags associated to the HEAD commit on the branch in addition to the branch? If so, I would like to consider this a bug report...

posted Jun 5, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

I do not think git is doing anything of the sort. The output you see
above comes from custom hooks on the server. We cannot say for certain
without seeing the hook's code, but it looks like the post-receive hook
is trying to create a tag to point to the tip of every push, but whoever
wrote the hook did not take into account branch deletions (and the fact
that you cannot create a tag pointing at a deletion).

answer Jun 5, 2013 by anonymous
Similar Questions
0 votes

Is there any reason why 'git clone -b' only takes a branch (from refs/heads/) or a tag (from refs/tags/) ?

Background: At $dayjob we're using some kind of 'hidden' refs (in refs/releases/) to communicate between the 'branch integrator' (who creates the ref in refs/releases/) and the 'build master' who wants to build that ref.

It would be a little easier if the build master could simply say

git clone -b refs/releases/the-release-for-today URL
instead of: git clone... ; cd ... ; git fetch... ; git checkout....

Any answer or even a better idea to solve that is appreciated.

0 votes

Is there a way to prevent reflog deletion when the branch is deleted? The last entry could simply be a line where the second SHA is all 0's.

0 votes

When I update my branch from master it pulls down several files, including some sass files. When I compile, however, gulp alerts me that I am missing .scss files.

I tested this by creating a new fresh branch and running gulp sass. This time there were no errors and I saw the missing .scss had been brought in.

Would anyone know why, on update, I am only getting some of the files from master?

0 votes

I bumped into a problem where git grep thinks files in repo/a/data are binary files when it is invoked from repo/a and repo/data/.gitattributes contains "* binary".

I can reproduce this on 1.7.9.5 and 1.7.10.4. Unfortunately I don't have a newer version at hand.

How to reproduce:

[pseudo:~/tmp]% git --version
git version 1.7.10.4
[pseudo:~/tmp]% git init git-test
Initialized empty Git repository in /home/opqdonut/tmp/git-test/.git/
[pseudo:~/tmp]% cd git-test
[pseudo:~/tmp/git-test:master()]% mkdir -p a/data
[pseudo:~/tmp/git-test:master()]% mkdir data
[pseudo:~/tmp/git-test:master()]% echo '* binary' > data/.gitattributes
[pseudo:~/tmp/git-test:master()]% echo foo > a/data/foo
[pseudo:~/tmp/git-test:master()]% git add -A
[pseudo:~/tmp/git-test:master()]% git commit -m "foo"
[master (root-commit) 20fafbb] foo
 2 files changed, 1 insertion(+)
 create mode 100644 a/data/foo
 create mode 100644 data/.gitattributes
[pseudo:~/tmp/git-test:master()]% git grep foo
a/data/foo:foo
[pseudo:~/tmp/git-test:master()]% cd a
[pseudo:~/tmp/git-test/a:master()]% git grep foo
Binary file data/foo matches
+1 vote

I have heard conflicting statements about the impact of branching in git. Let's say we have 100 feature branches that are all stored in a remote repo, would that affect performance (CPU/network) in a noticeable way ? How about 1000? 100,000 branches? In other words how does git scale with regards to number of branches?

...