6 # --- GIT -----------------------------------------------------------------------
11 while [ -n "$work_dir" -a "$work_dir" != "/" ]; do
12 [ -d "${work_dir}/.git" ] && {
13 echo "${work_dir}/.git/"
16 work_dir
=`dirname "$work_dir"`
28 GIT_DIR
=`found_git_dir "$WORK_DIR"`
29 [ -z "$GIT_DIR" ] && GIT_DIR
=$WORK_DIR
30 curr_year
=`date +"%Y"`
32 git
--git-dir="$GIT_DIR" log
--abbrev=7 --pretty="format:%at %h %an" -- "$fname" |
while read TIMESTAMP chset author
34 year
=`date -d @"$TIMESTAMP" +"%Y"`
35 [ "$year" = "$curr_year" ] && {
36 DATE
=`date -d @"$TIMESTAMP" +"%b %d %H:%M"`
38 DATE
=`date -d @"$TIMESTAMP" +"%b %d %Y"`
41 echo "-rw-rw-rw- 1 $USER 0 0 $DATE $NAME.diff"
45 patchsetfs_copyout_git
()
52 chset
=`echo "$orig_fname"| cut -f 1 -d " "`
54 GIT_DIR
=`found_git_dir "$WORK_DIR"`
55 [ -z "$GIT_DIR" ] && GIT_DIR
=$WORK_DIR
57 git
--git-dir="$GIT_DIR" show
"$chset" -- "$fname" > "$output_fname"
60 # --- COMMON --------------------------------------------------------------------
68 DATE
=`date +"%b %d %H:%M"`
72 git
) patchsetfs_list_git
"$WORK_DIR" "$fname" "$USER" "$DATE" ;;
83 git
) patchsetfs_copyout_git
"$WORK_DIR" "$fname" "$@" ;;
88 # --- MAIN ----------------------------------------------------------------------
93 WORK_DIR
=`head -n1 $tmp_file`
94 fname
=`tail -n2 $tmp_file | head -n1`
95 VCS_type
=`tail -n1 $tmp_file`
98 list
) patchsetfs_list
"$VCS_type" "$WORK_DIR" "$fname" ;;
99 copyout
) patchsetfs_copyout
"$VCS_type" "$WORK_DIR" "$fname" "$@" ;;