dulwich-users team mailing list archive
-
dulwich-users team
-
Mailing list archive
-
Message #00749
Re: Fetch branch
> The fetch function returns them.
Is there a way to get them without calling fetch?
What if I have no network connection, so I can't
connect to the remote? The only thing I can think
of is to write them to a file when I clone the repo
the first time. Something like:
import csv
with open('dulwich_refs', 'wb') as file:
writer = csv.writer(file, delimeter=' ')
for key, value in refs.items():
writer.writerow([key, value])
then if I need them later I will have the shas.
1. is there a better way?
2. this file is modelled after packed_refs file. Is this
a good format? It seems arbitrary, since I just made
it up. There is probably a more standard git format,
like packed_refs, that would be more meaningful, and
what people expect.
Thanks again!
Mark
Follow ups
References