git-merge fails when trying to merge from a tag

From: Carl Baldwin <cnb@fc.hp.com>
Date: 2005-12-14 04:55:16
Greetings,

I just tried to merge using a tag object.  I expected this to work just fine
since the tag refers to a commit object and is therefore committish.  The very
same merge command except with '^{}' appended to the tag name to select the
commit object worked just fine.  Below you'll find some interesting output.

Cheers,
Carl

PS  I used git-bisect for the first time this morning.  I was VERY impressed.
Anyway, on to the output...

% git --version
git version 0.99.9m

% git merge "Merging release-0.3.1" HEAD refs/tags/release-0.3.1
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
Merging HEAD with refs/tags/release-0.3.1
Merging:
df17837d378c5ee07a26c97ac1bfc3fb3f7bacbb Fix test of  string
f2aa1e01ae0f1b0ea9354f2ea2c7444b5efc8ac5 Merging release-0.2.1
found 1 common ancestor(s):
43c6310a463aee1c2cbd882b81a596e429bc7f6c Commit msg
Auto-merging scripts/config.sh

fatal: 4c29c70d1d290807c2757eabaefb607b8fd7b595 is not a valid 'commit' object

% git-cat-file tag 4c29c70d1d290807c2757eabaefb607b8fd7b595
object f2aa1e01ae0f1b0ea9354f2ea2c7444b5efc8ac5
type commit
tag release-0.3.1
tagger Carl N. Baldwin <carl@ecbaldwin.net> 1134493064 -0700
... (The rest of the tag object looks just as you'd expect)

% git checkout -f # To reset changes done by failed merge
% git merge "Merging release-0.3.1" HEAD refs/tags/release-0.3.1^{}
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
Merging HEAD with refs/tags/release-0.3.1^{}
Merging:
df17837d378c5ee07a26c97ac1bfc3fb3f7bacbb Fix test of  string
f2aa1e01ae0f1b0ea9354f2ea2c7444b5efc8ac5 Merging release-0.2.1
found 1 common ancestor(s):
43c6310a463aee1c2cbd882b81a596e429bc7f6c Commit msg
Auto-merging scripts/config.sh

Merge 5612809ea11c9709e3a5282f8002c1f993e127d6, made by recursive.
 scripts/config.sh |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Carl Baldwin                        Systems VLSI Laboratory
 Hewlett Packard Company
 MS 88                               work: 970 898-1523
 3404 E. Harmony Rd.                 work: Carl.N.Baldwin@hp.com
 Fort Collins, CO 80525              home: Carl@ecBaldwin.net
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Dec 14 04:55:51 2005

This archive was generated by hypermail 2.1.8 : 2005-12-14 04:55:58 EST