I haven't been able to boil this down to a minimal reproduction yet
but here's my current reproduction -- I'm very confused by the output
I've gathered so far:
```
rm -rf repo1
git init repo1
cd repo1
git remote add origin https://github.com/asottile/pyupgrade
git -c protocol.version=2 fetch origi
`git rev-parse --show-prefix` gives the symlinked directory, not pwd:
```
$ git init
Initialized empty Git repository in [~]/git-test/.git/
$ mkdir realdir
$ ln -s realdir symdir
$ cd symdir
$ pwd
[~]/misc/git-test/symdir
$ git rev-parse --show-prefix
realdir/
```
That might arguably be desirable
Let's make it possible to test oidmap_get_next() by adding a 'get_all'
subcommand that calls oidmap_get() once first and then oidmap_get_next()
several times until there is no more entry with the same oid key.
Signed-off-by: Christian Couder
---
t/helper/test-oidmap.c | 17 +
1 f
Let's add a test case to test both the 'add' and 'get_all' subcommand
from "test-oidmap.c", and through them oidmap_add() and
oidmap_get_next() from "oidmap.{c,h}".
Signed-off-by: Christian Couder
---
t/t0016-oidmap.sh | 26 ++
1 file changed, 26 insertions(+)
diff --git
Let's making it ppossible to test oidmap_add() by adding an 'add'
subcommand.
Signed-off-by: Christian Couder
---
t/helper/test-oidmap.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/t/helper/test-oidmap.c b/t/helper/test-oidmap.c
index 0acf99931e..c19b41aa4f 100644
---
This is an RFC patch series that is not intended to be merged for now,
as it looks like we don't need oidmaps that can handle several entries
with the same key yet.
As I needed this for my work on reftable, I thought that I might as
well post it, to get early feedback and to avoid duplicating work
For now "oidmap.h" gives us no way to get all the entries that have the
same oid key from an oidmap, as oidmap_get() will always return the first
entry. So let's add oidmap_get_next() for this purpose.
Signed-off-by: Christian Couder
---
oidmap.c | 8
oidmap.h | 6 ++
2 files change
We will need to have more than one entry with the same oid key
in an oidmap, which is not supported yet, as oipmap_put()
replaces an existing entry with the same oid key. So let's add
oidmap_add().
Signed-off-by: Christian Couder
---
oidmap.c | 12
oidmap.h | 6 ++
2 files chan
8 matches
Mail list logo