Skip to content

Issues with using tags #174

@junegunn

Description

@junegunn

We had a few regressions lately (#166, #170, #173), so I'm trying to expand the coverage of Travis CI build by running the tests not only with the recent version of Vim, but with the older vim-nox package of Ubuntu 12.04.

language: ruby
rvm:
  - 1.8.7
  - 2.0.0
  - 1.9.2 # Test with vim-nox package on ubuntu

before_script: |
  if [ $(ruby -e 'puts RUBY_VERSION') = 1.9.2 ]; then
    apt-get update -y
    apt-get install -y vim-nox
    ln -s /usr/bin/vim /usr/local/bin/vim
  else
    hg clone https://code.google.com/p/vim/
    cd vim
    ./configure --with-features=huge --enable-rubyinterp
    make
    sudo make install
    cd -
  fi

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

script: |
  test/run !

However, I've noticed that a couple of tests fail because of the inconsistent behavior of the stock git (1.7.9.5).

When cloning a repository with tag

# Git 1.7.9.5
git clone --progress --recursive https://github.com/junegunn/goyo.vim.git -b 1.5.3

Cloning into 'goyo.vim'...
remote: Counting objects: 261, done.
remote: Total 261 (delta 0), reused 0 (delta 0), pack-reused 261
Receiving objects: 100% (261/261), 46.80 KiB, done.
Resolving deltas: 100% (104/104), done.
warning: Remote branch 1.5.3 not found in upstream origin, using HEAD instead

# Git 2.2.1
Cloning into 'goyo.vim'...
remote: Counting objects: 261, done.
remote: Total 261 (delta 0), reused 0 (delta 0), pack-reused 261
Receiving objects: 100% (261/261), 46.80 KiB | 0 bytes/s, done.
Resolving deltas: 100% (104/104), done.
Checking connectivity... done.
Note: checking out 'ed3d591346cddf0bfcbc0916cf3a1b3fc4158ff2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

The failing test cases expect the second behavior. However, specifying the name of a branch does not result in inconsistency:

# Git 1.7.9.5
git clone --progress --recursive https://github.com/junegunn/seoul256.vim.git -b no-t_co

Cloning into 'seoul256.vim'...
remote: Counting objects: 314, done.
remote: Total 314 (delta 0), reused 0 (delta 0), pack-reused 314
Receiving objects: 100% (314/314), 62.45 KiB, done.
Resolving deltas: 100% (117/117), done.

Tags don't work with git merge --ff-only origin/TAG_NAME

This is another bug I found, which makes it impossible to update plugins with designated tags. It fails regardless of the version of git.

# Branch
> git merge --ff-only origin/no-t_co
Already up-to-date.

# Tag
> git merge --ff-only origin/1.5.3
fatal: 'origin/1.5.3' does not point to a commit

This regression was introduced by 0e9fa67 for fixing #139.

So, basically, it looks like tags and branches are not interchangeable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions