Merge branch 'master' of git://github.com/ndbroadbent/scm_breeze

This commit is contained in:
Aljaž "g5pw" Srebrnič
2012-11-14 11:09:54 +01:00
6 changed files with 28 additions and 16 deletions

View File

@@ -154,13 +154,11 @@ EOF
else
ll_files="$(\ls "$@")"
fi
# Escape single and double quotes
ll_files=$(echo "$ll_files" | \sed -e 's/"/\\\\\\"/g' -e "s/'"'/\\\\'"'/g")
OLDIFS="$IFS"; IFS=$'\n'
for file in $ll_files; do
if [ -n "$rel_path" ]; then file="$rel_path/$file"; fi
export $git_env_char$e="$(eval $_abs_path_command \"$file\")"
export $git_env_char$e="$(eval $_abs_path_command \"${file//\"/\\\"}\")"
if [ "${scmbDebug:-}" = "true" ]; then echo "Set \$$git_env_char$e => $file"; fi
let e++
done

View File

@@ -20,11 +20,11 @@
# # groups => 1: staged, 2: unmerged, 3: unstaged, 4: untracked
# --------------------------------------------------------------------
@project_root = File.exist?(".git") ? Dir.pwd : `git rev-parse --git-dir 2> /dev/null`.sub(/\/\.git$/, '').strip
@project_root = File.exist?(".git") ? Dir.pwd : `\git rev-parse --git-dir 2> /dev/null`.sub(/\/\.git$/, '').strip
@git_status = `git status --porcelain 2> /dev/null`
@git_status = `\git status --porcelain 2> /dev/null`
git_branch = `git branch -v 2> /dev/null`
git_branch = `\git branch -v 2> /dev/null`
@branch = git_branch[/^\* (\(no branch\)|[^ ]*)/, 1]
@ahead = git_branch[/^\* [^ ]* *[^ ]* *\[ahead ?(\d+)\]/, 1]
@@ -102,7 +102,7 @@ end
@git_status_long = `git status`.gsub(/\033\[[^m]*m/, "") # (strip colors)
end
end
msg, col, group = case change[0..1]
when "DD"; [" both deleted", :del, :unmerged]
@@ -156,7 +156,7 @@ def output_file_group(group)
# Find relative path, i.e. ../../lib/path/to/file
rel_file = relative_path(Dir.pwd, File.join(@project_root, h[:file]))
# If some submodules have changed, parse their summaries from long git status
sub_stat = nil
if @git_status_long && (sub_stat = @git_status_long[/#{h[:file]} \((.*)\)/, 1])

View File

@@ -138,7 +138,7 @@ scmb_expand_args() {
# Execute a command with expanded args, e.g. Delete files 6 to 12: $ ge rm 6-12
# Fails if command is a number or range (probably not worth fixing)
exec_scmb_expand_args() { eval "$(scmb_expand_args "$@" | sed -e 's/\([][()<>^ ]\)/\\\1/g')"; }
exec_scmb_expand_args() { eval "$(scmb_expand_args "$@" | sed -e "s/\([][()<>^ \"']\)/"'\\\1/g')"; }
# Clear numbered env variables
git_clear_vars() {

View File

@@ -136,3 +136,7 @@ git_branch_delete_all() {
$_git_cmd branch -D -r origin/$1
$_git_cmd push origin :$1
}
commit_docs() {
git commit -m "Update README / Documentation [ci skip]"
}