Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: vcs_info git: Fix stagedstr for empty repos
- X-seq: zsh-workers 32649
- From: Aaron Schrab <aaron@xxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: vcs_info git: Fix stagedstr for empty repos
- Date: Sun, 1 Jun 2014 08:33:02 -0400
- Cc: zsh-workers@xxxxxxx
- In-reply-to: <20140601022653.GE1820@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20140601022653.GE1820@tarsus.local2>
At 02:26 +0000 01 Jun 2014, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
'diff-index --cached --quiet $empty_tree' is an O(1) operation, but I
am not sure whether it is forwards compatible with future versions of
Git, i.e., whether it's a hack that happens to work or a legitimate use
of git's API.
git itself does that comparison in several places, including in the
sample pre-commit hook that is shipped with it. So I'd say that that
behavior is highly unlikely to change. Many of those places, including
that sample hook actually hard-code the sha1 for the empty tree as
4b825dc642cb6eb9a060e54bf8d69288fbee4904.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author