# Possible bug in `git reset` in 1.9

2 messages from 2014-06-18 to 2014-06-18. Participants: James Coleman.
Thread: https://gitlist.dev/t/36948

## James Coleman, 2014-06-18 17:01

Subject: Possible bug in `git reset` in 1.9
Message-ID: <CAAaqYe9FcjE9v+bkcnkPim8ntFvbUy72dJJCGs7974dq_9eSOw@mail.gmail.com>
URL: https://gitlist.dev/e/CAAaqYe9FcjE9v%2BbkcnkPim8ntFvbUy72dJJCGs7974dq_9eSOw%40mail.gmail.com

```
Suppose I have the following branches:
* branch-1 with commits A - B - C
* branch-2 with commits A - B - C - D

Prior to version 1.9, running `git reset --hard D` while branch-1 is
checked out will result in changing the current branch HEAD to commit
hash D (essentially what update-ref would do).

In 1.9.1 (I haven't tested on 1.9.0 yet), however, running `git reset
--hard D` while branch-1 is checked out will result in the following
output:
$ fatal: Could not parse object 'D'

I assume that this is not an expected change as nothing about changes
to the reset command is present in the change log for 1.9.0 or 1.9.0.
Is this a bug or was the previous behavior unexpected as well? Either
way, it's a regression in terms of what can be expected based on
previous version.

```

## James Coleman, 2014-06-18 17:20

Subject: Re: Possible bug in `gitreset` in 1.9
Message-ID: <loom.20140618T191909-464@post.gmane.org>
URL: https://gitlist.dev/e/loom.20140618T191909-464%40post.gmane.org
In-Reply-To: <CAAaqYe9FcjE9v+bkcnkPim8ntFvbUy72dJJCGs7974dq_9eSOw@mail.gmail.com>

```
Followup on this, it looks like the local repository actually didn't contain
branch-2. So this doesn't appear to be an issue.

```
