From: Andy Moreton <andrewjmoreton@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: emacs-repository-version on MS-Windows
Date: Sun, 16 Nov 2014 23:41:12 +0000 [thread overview]
Message-ID: <868uja3e93.fsf@gmail.com> (raw)
In-Reply-To: 834mtzdtfr.fsf@gnu.org
On Sun 16 Nov 2014, Eli Zaretskii wrote:
>> From: Andreas Schwab <schwab@linux-m68k.org>
>> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
>> Date: Sat, 15 Nov 2014 23:42:46 +0100
>>
>> > The bzr version of this intentionally avoided calling external executables.
>> > (Apparently not possible with git.)
>>
>> You can do that with git as well, the repository structure is fully
>> documented (gitrepository-layout(5)). Of course, you have to be
>> prepared to update the procedure in case of future extensions.
>
> So is the following algorithm correct?
>
> . visit the file .git/HEAD
> . if the contents is a SHA1 checksum, we are done: return that SHA1
> . otherwise:
> . parse the contents of .git/HEAD that should have the form
> "ref: refs/heads/BRANCH" where BRANCH is the name of the active
> branch
> . try visiting the file .git/refs/heads/BRANCH
> . if the file exists, its contents should be the SHA1 checksum we
> are looking for
> . otherwise:
> . visit the file .git/packed-refs, whose contents should be
> lines of the form "SHA1 REF"
> . find the line in that file whose REF part is "refs/heads/BRANCH"
> . the SHA1 part of that line is the checksum we are looking for
>
> Does this cover all the possible arrangements of the repository and
> all the possible workflows?
The descripriton of .git/HEAD in gitrepository-layout(5) suggests that
it can also be a symlink rather than a git symref.
AndyM
next prev parent reply other threads:[~2014-11-16 23:41 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 9:32 emacs-repository-version on MS-Windows Eli Zaretskii
2014-11-14 9:40 ` Eli Zaretskii
2014-11-14 9:48 ` Chris Zheng
2014-11-14 10:13 ` Eli Zaretskii
2014-11-14 10:53 ` Chris Zheng
2014-11-14 14:13 ` Eli Zaretskii
2014-11-15 11:27 ` Fabrice Popineau
2014-11-15 11:39 ` Eli Zaretskii
2014-11-15 11:58 ` Fabrice Popineau
2014-11-15 12:57 ` Fabrice Popineau
2014-11-15 13:01 ` Eli Zaretskii
2014-11-14 9:57 ` martin rudalics
2014-11-14 10:14 ` Eli Zaretskii
2014-11-14 10:57 ` Dani Moncayo
2014-11-14 14:15 ` Eli Zaretskii
2014-11-15 20:20 ` Eli Zaretskii
2014-11-15 21:44 ` Glenn Morris
2014-11-15 22:42 ` Andreas Schwab
2014-11-16 16:03 ` Eli Zaretskii
2014-11-16 16:27 ` David Kastrup
2014-11-16 17:56 ` Eli Zaretskii
2014-11-16 18:26 ` David Kastrup
2014-11-16 16:33 ` Andreas Schwab
2014-11-16 18:00 ` Eli Zaretskii
2014-11-16 18:15 ` Eli Zaretskii
2014-11-16 16:47 ` Achim Gratz
2014-11-16 18:05 ` Eli Zaretskii
2014-11-16 23:41 ` Andy Moreton [this message]
2014-11-17 3:45 ` Eli Zaretskii
2014-11-16 19:30 ` Glenn Morris
2014-11-16 3:40 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=868uja3e93.fsf@gmail.com \
--to=andrewjmoreton@gmail.com \
--cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).