Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: version.h and ChangeLog



On Mon, Apr 08, 2013 at 10:02:07PM +0100, Peter Stephenson wrote:
> By the way, are we guaranteed that the output of 'git describe --tags
> --long' is the same for everyone that has pulled the same code from the
> server (and doesn't have local changes)?  If not, it would be worth a
> bit of extra work to make it so: the whole point of the patchlevel is so
> it consistently refers to a particular state of what's on the server for
> reporting by users who are just tracking development.

Yes. git describe --tags --long uses the current commit and the
existing tags to create the string. If the user has the same
commit (e.g. by running git pull to get the latest changes) then
git describe will be the same.

>                                                        Local changes are
> really a special case here --- people developing the shell can be
> assumed to be knowledgeable enough to make their own investigations ---
> though if it's possible to indicate that there are changes not pushed to
> the server in a way that sticks out, e.g. with something appended like
> "-local-<ref>", that's useful, too.  This is definitely looking like a
> script.

Local commits aren't treated any different. But it's easy to
check because they don't exist in the official repository.

Consider this $ZSH_PATCHLEVEL: zsh-5.0.2-51-g9e7696a (the g means
Git and is not part of the sha1) which is from a local branch of
mine:

    $ git branch --contains 9e7696a 2>/dev/null
    $

And from an official commit, zsh-5.0.2-58-ge619a73:

    $ git branch --contains e619a73 2>/dev/null
    * master
    $

Appending something like "-local-<ref>" is difficult because
what's considered local depends on how Git is used. We could
check "origin"/master but what if I call the remote branch
"upstream"?

Regards
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Attachment: signature.asc
Description: Digital signature



Messages sorted by: Reverse Date, Date, Thread, Author