Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

external diff show empty files sometimes (macosx)

Hello

Quite often, when I open "external diff" (launching excellent Syntevo SmartSynchronize), one of the files extracted in temp dir /var/folders/... is empty ! (using SourceTree 2.5.2 for MacOsX)

I give it here for information :

#!/bin/bash
# SourceTree custom action
# example : /Users/rc/ADL/admin/gitgettemp.sh /Users/rc/E5/dev/git/5flowv2dev mise-en-prod-riccardo.txt 4dcf879789ed246c050494100c3b245db17766e3
#echo $0 $1 $2 $3 $4 $5
dir=$1
filepath=$2
commit=$3
#
cd $dir
branch=`git name-rev --name-only $commit | cut -d \~ -f 1`
commits=`git log --pretty=format:"%H" --all $filepath`
#
echo
echo DIRECTORY=$dir
echo BRANCH=$branch
echo COMMITS=
echo $commits
#
echo
curfound=0
prevcommit=0
for idcom in $commits ; do
if [ "$curfound" == "1" ] ; then
prevcommit=$idcom
curfound=2
fi
if [ "$idcom" == "$commit" ] ; then
curfound=1
fi
done
echo curcommit=$commit, prevcommit=$prevcommit
#
echo
outdir=/Users/rc/zdrop/appdata/gitextract
filename=$(basename $filepath)
if [ "$prevcommit" == "0" ] ; then
echo NOTHING BEFORE
else
echo Exported to $outdir
curfile=${outdir}/${filename}-${commit}
prevfile=${outdir}/${filename}-${prevcommit}
git show $commit:$filepath > $curfile
git show $prevcommit:$filepath > $prevfile
/Applications/soft/SmartSynchronize.app/Contents/MacOS/SmartSynchronize $curfile $prevfile >/dev/null 2>&1
fi
#
echo
echo END

0 comments

Comment

Log in or Sign up to comment
TAGS
Community showcase
Posted in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

3,716 views 19 19
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you