From: Erik Bernoth <erik.bernoth@gmail.com>
To: git@vger.kernel.org
Subject: Index Fileformat: stat(2) info necessary? What for?
Date: Mon, 26 Aug 2013 14:34:18 +0200 [thread overview]
Message-ID: <CAB46HOmMtgD+CtWUS3CQhr+ux1a3JP=hF2Cerd2nmDWzX5pxcw@mail.gmail.com> (raw)
Hi,
I am still working on implementing git in Python for self education
purposes. Implementing the Index in memory was no problem after I
understood how its done with help of Andreas Ericsson and Junio C
Hamano.
Now I want to store an Index state to the filesystem in a
git-compatible file format. I looked up what the Git documentation has
to say about that [1]. Now there's a lot of information (all the
stat(2) stuff) that gets stored about the staged files, which I never
needed for file-IO in Python or Java. In my eyes if a person would be
cloning my git repository he wouldn't need it as well, because the new
inode on his system will probably be different from mine and applying
the access rights onto the cloning user id and group id would also
make sense, because that user introduced that file to that system.
Thus I am now missing concrete experience in when this stat(2)
information comes in handy or if it would be completely okay in a
python-git implementation to just store the info shown with `git
ls-files -s` to a file, maybe zlib.compressed like a git object. Of
course I would then lose the compatibility with git repositories,
which is a shame even if it would make sense. What is your opinion?
[1] https://github.com/git/git/blob/master/Documentation/technical/index-format.txt
Cheers
Erik
next reply other threads:[~2013-08-26 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 12:34 Erik Bernoth [this message]
2013-08-26 22:17 ` Index Fileformat: stat(2) info necessary? What for? Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAB46HOmMtgD+CtWUS3CQhr+ux1a3JP=hF2Cerd2nmDWzX5pxcw@mail.gmail.com' \
--to=erik.bernoth@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).