# fix generated hash of by-path dependencies · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a57b0a0f2fe5a3a0af740495c60d4f3d0b6abfec)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a57b0a0f2fe5a3a0af740495c60d4f3d0b6abfec

Requested commit: a57b0a0f2fe5a3a0af740495c60d4f3d0b6abfec

Commit: a57b0a0f2fe5a3a0af740495c60d4f3d0b6abfec

Tree: 55f195dc055261860fd43c27f6c38d966d8e75b6

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix generated hash of by-path dependencies

This branch regressed from master by switching to binary rather than hex
digest, allowing null bytes to end up in identifiers in the zig file.

This commit fixes it by changing the "hash" to be literally equal to the
sub_path (with a prefix '/' to indicate "global") if it can fit. If it
is too long then it is actually hashed, and that value used instead.

```

## Parents

- [e03bc7ac78820b7763d6ecd21cfa19653535f8d0](https://git.cafe/gitcafe/zig/commit/e03bc7ac78820b7763d6ecd21cfa19653535f8d0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a57b0a0f2fe5a3a0af740495c60d4f3d0b6abfec?format=markdown)
