Skip to content

Negative fetch refspec breaks gitstatus #438

Description

@Frederick888

My CI pushes some generate files to <current branch/tag>-deploy branches/tags. Usually I don't want to fetch them, so I added two negative fetch refspecs:

[remote "origin"]
	url = https://github.com/Frederick888/playground.git
	pushurl = git@github.com:Frederick888/playground.git
	fetch = +refs/heads/*:refs/remotes/origin/*
	fetch = ^refs/heads/*-deploy
	fetch = ^refs/tags/*-deploy
	tagOpt = --tags
	gh-resolved = base

This breaks gitstatus.

For example, git clone https://github.com/Frederick888/playground.git; cd playground; git reset --hard HEAD~, then without the negative refspecs, the response is:

'id'
'1'
'/Users/frederick/programming/Others/playground'
'b46755b65173bbc9733356ec8a7a8c0214f33910'
'master'
'master'
'origin'
'https://github.com/Frederick888/playground.git'
''
'16'
'0'
'0'
'0'
'0'
'0'
'1'
'0'
''
'0'
'0'
'0'
'origin'
'https://github.com/Frederick888/playground.git'
'0'
'1'
'0'
'0'
''
'Commit 2 on master'

With the negative refspecs, the response is:

'id'
'1'
'/Users/frederick/programming/Others/playground'
'b46755b65173bbc9733356ec8a7a8c0214f33910'
'master'
''
''
''
''
'16'
'0'
'0'
'0'
'0'
'0'
'0'
'0'
''
'0'
'0'
'0'
''
''
'0'
'0'
'0'
'0'
''
'Commit 2 on master'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions