Skip to content
Snippets Groups Projects
Commit 7a5525a1ca4b authored by muxator's avatar muxator
Browse files

hggit: add test to show the behaviour when looking up an ambiguous prefix

This is correct behaviour. The test's purpose is showing that next commit keeps
the external behaviour.
parent 19d34b8f69da
No related branches found
No related tags found
1 merge request!69Draft: Raise AmbiguousPrefixLookupError like Mercurial does
Load commonly used test logic
$ . "$TESTDIR/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha
$ fn_git_commit -m 'add alpha'
$ echo beta > beta
$ git add beta
$ fn_git_commit -m 'add beta'
This commit is called gamma10 so that its hash will have the same initial digit
as commit alpha. This lets us test ambiguous abbreviated identifiers.
$ echo gamma10 > gamma10
$ git add gamma10
$ fn_git_commit -m 'add gamma10'
$ cd ..
$ hg clone gitrepo hgrepo | grep -v '^updating'
importing git objects into hg
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd hgrepo
$ hg log -r 'gitnode(7e)'
abort: git-mapfile@7e: ambiguous identifier!
[255]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment