Use short_id instead of [0..N] for short version of commit sha

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Use full commit sha width for reference in note body to prevent Ambiguous SHA1 prefix problem

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Dont raise exception when wrong commit id passed

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Use 8chars short sha for commit in views

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fix tests

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Dontr decoarate already decorated stuff

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fix spinach tests

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fix tests

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Merge branch 'ambiguous-sha' into 'master'

Fix ambiguous sha problem with mentioned commit

Before: write in database only 6 chars of commit sha. This cause to `Ambiguous SHA1 prefix` exception.

- [x] write full commit sha in db.
- [x] Standardise usage of sha truncation: 8 characters everywhere.
- [x] prevent exception when ambiguous sha requested in markdown

Fixes #1644

See merge request !1171