Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[api] add function to get snapshot's units. Fixes MER#1184
Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
- Loading branch information
Denis Zalevskiy
committed
Sep 11, 2015
1 parent
95aef76
commit 786c693
Showing
7 changed files
with
140 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
configure_file(vault-gc.service.in vault-gc.service @ONLY) | ||
|
||
install( | ||
PROGRAMS git-vault-gc gc-default | ||
PROGRAMS git-vault-gc gc-default git-vault-snapshot-units | ||
DESTINATION ${TOOLS_DIR} | ||
) | ||
|
||
install( | ||
FILES git-vault-rebase-generate.awk git-vault-rebase-prepare.awk | ||
FILES git-vault-rebase-generate.awk git-vault-rebase-prepare.awk vault-misc | ||
DESTINATION ${TOOLS_DIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
src=$(dirname $0) | ||
src=$(cd $src;pwd) | ||
source $src/vault-misc || exit 1 | ||
|
||
ensure_param_count_exit_usage $# 1 "<tag>" | ||
tag=">$1" | ||
|
||
tag_describe() { | ||
git describe --tags "$1" || error 33 "No tag '$1'" | ||
} | ||
|
||
tag=$(tag_describe "$tag") | ||
tag_prev=$((tag_describe "$tag^" | sed -e 's|\(.*\)-[0-9]*-g[0-9a-f]*|\1|') || error 44 "No previous tag") | ||
units= | ||
for c in $(git log --format=%s "$tag_prev..$tag" | grep '^>'); do | ||
unit=$(echo $c | sed -e 's|^>||') | ||
if [[ "x$units" != "x" ]]; then | ||
units+=" $unit" | ||
else | ||
units=$unit | ||
fi | ||
done | ||
echo $units | tr " " "\n" | sort -u | grep -v "^$" | ||