Hi, On Sat, 18 Sept 2021 at 12:05, Ludovic Courtès <l...@gnu.org> wrote: > zimoun <zimon.touto...@gmail.com> skribis:
> > Does it make sense to pass this ’swhid’ equal to ’swh:1:rev’ with the > > ’flat’ archive-type? Another instance is, [...] > > and from my understanding, again ’swhid’ depends on ’archive-type’. > > Therefore, it prone error. > > ‘git-bare’ only makes sense for a revision, not a directory, but I So it does not seem possible to form a 'swhid' as "swh:1:dir" and pass 'archive-type' as 'git-bare'. And conversely with 'swh:1:rev' and 'flat'. Right? I have not tried though. :-) If yes, it means the both arguments 'swhid' and 'archive-type' are linked so the function should accept only one unifyied argument and not 2 independent ones. IMHO. > wonder if ‘flat’ can be used for a revision (in which case it’d be > equivalent to getting the corresponding directory)? > > I agree there’s some redundancy between directory/revision and > flat/git-bare, but it’s the SWH API that looks like this, so I’d be > tempted to just keep it as is. Maybe we could ask for guidance on > #swh-devel. Well, let postpone the refactoring. :-) However, if it works as I understand, then the refactoring seems the correct way so I would not accept a backward compatibility argument. ;-) Have a nice week-end, simon