1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #7798 invalid

Weird git ls-remote output

Nathan Delhaye
created an issue


When i'm doing a "git ls-remote" the last line contain weird characters : ^{}

Example from github :

From https://github.com/heroku/node-js-sample.git
f0a7d6b6cf64f408601c1597064cea05835a5f61        HEAD
0b1bfe178869ba23a07cb118c362b29878b9a13e        refs/pull/1/head
a5a98d8deaef0d89e2b872dea45576ba835e159a        refs/pull/1/merge
94f75ca3ca6fd59e57aa44d997d138b4c6589900        refs/pull/9/head
13b657144cbe8329bd2eeb6330fed67f5a959899        refs/pull/9/merge

From bitbucket :

From https://TheRedCat@bitbucket.org/TheRedCat/oh-my-games-gestion-de-projet.git
518b6e814081ad63d1c5710bcea6061a6d6a6f5d        HEAD
518b6e814081ad63d1c5710bcea6061a6d6a6f5d        refs/heads/master
68ccad6b2b9eadc4b54f441d5041c30e3bc091e7        refs/tags/1.0
518b6e814081ad63d1c5710bcea6061a6d6a6f5d        refs/tags/1.0^{}

The "^{}" shouldn't be there.

This is a problem for automated-deployment tools like capistrano.

Comments (4)

  1. Erik van Zijst staff

    That ^{} is there because:

    A suffix ^ followed by an empty brace pair means the object could be a tag, and dereference the tag recursively until a non-tag object is found.

    https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html http://stackoverflow.com/a/12939216/1028762

    I suspect you'll see the same thing if you push your repo (including all its tags!) to GitHub. The refs in your first example are all github-created pullrequest refs, which are most likely symbolic refs.

  2. Log in to comment