threads / discuss / 48569

git difftool with symlink to readonly jar failed

Subject: git difftool with symlink to readonly jar failed

## tl;dr

3 messages between May 24, 2018 and May 25, 2018.

replies: 2people: 2as markdown or json

Etienne d'Hautefeuille· May 24, 2018, 21:11 UTC · lore
Hi,

In my repo, I have some symlink to readonly jar, I can't make difftool between 2 commit

Steps to reproduce :
> git --version
     git version 2.17.0
> id

uid=1000(sagoum) gid=1000(sagoum) groupes=1000(sagoum),5(tty),10(wheel),14(uucp),18(audio),20(dialout),27(video),35(games),78(kvm),85(usb),100(users),104(plugdev),992(android),993(docker),997(vboxusers)

# readonly jar
> ls -l /home/tempogit/jenkins_war

total 510012 -rwxr----- 1 root users 74585998 24 mai 21:08 jenkins-2.110.war -rwxr----- 1 root users 74612387 24 mai 21:08 jenkins-2.114.war -rwxr----- 1 root users 74606954 24 mai 21:08 jenkins-2.116.war -rwxr----- 1 root users 74737297 24 mai 21:08 jenkins-2.121.war -rwxr----- 1 root users 74525235 24 mai 21:08 jenkins-LTS-2.107.1.war -rwxr----- 1 root users 74568464 24 mai 21:08 jenkins-LTS-2.107.2.war -rwxr----- 1 root users 74576216 24 mai 21:08 jenkins-LTS-2.107.3.war

#create a repo with symlink to this jar

mkdir ~/tempo_2.17.0 cd ~/tempo_2.17.0 git init ln -s /home/tempogit/jenkins_war/jenkins-2.110.war jenkins.war git add jenkins.war git commit -a -m " add symlink on jenkins-2.110.war"

rm jenkins.war ln -s /home/tempogit/jenkins_war/jenkins-2.114.war jenkins.war git add jenkins.war git commit -a -m " add symlink on jenkins-2.114.war"

rm jenkins.war ln -s /home/tempogit/jenkins_war/jenkins-2.116.war jenkins.war git add jenkins.war git commit -a -m " add symlink on jenkins-2.116.war"

#detail of the repo
git log
commit ac1bc44d899ffd5406a7b0c413cf6c2e3497d496 (HEAD -> master)
Author: kakoum <sagoum.kakoum@gmail.com>
Date:   Thu May 24 22:47:09 2018 +0200
      add symlink on jenkins-2.116.war
commit 0244799661b993b1f78fa5afb621de3fe4c4a39c
Author: kakoum <sagoum.kakoum@gmail.com>
Date:   Thu May 24 22:47:09 2018 +0200
      add symlink on jenkins-2.114.war
commit 4cb98b4a307ce97d9e6b8e4b03211fa5ca8af7e7
Author: kakoum <sagoum.kakoum@gmail.com>
Date:   Thu May 24 22:47:09 2018 +0200
      add symlink on jenkins-2.110.war

#try a diff git difftool --dir-diff 4cb98b4a307ce97d9e6b8e4b03211fa5ca8af7e7 0244799661b993b1f78fa5afb621de3fe4c4a39c fatal: impossible d'ouvrir '/tmp/git-difftool.UQ4mqo/left/jenkins.war' en écriture: Permission non accordée

#temporary file
  find /tmp/git-difftool.UQ4mqo/ -ls
    412444      0 drwx------   4  sagoum sagoum       80 mai 24 22:48
/tmp/git-difftool.UQ4mqo/
    412446      0 drwx------   2  sagoum sagoum       40 mai 24 22:48
/tmp/git-difftool.UQ4mqo/right
    412445      0 drwx------   2  sagoum sagoum       60 mai 24 22:48
/tmp/git-difftool.UQ4mqo/left
    412449      0 lrwxrwxrwx   1  sagoum sagoum       44 mai 24 22:48
/tmp/git-difftool.UQ4mqo/left/jenkins.war ->
/home/tempogit/jenkins_war/jenkins-2.110.war

# I have no problem to launch a bcompare between /tmp/git-difftool.UQ4mqo/left and /tmp/git-difftool.UQ4mqo/right (which is empty)

Thank
Christian Couder· May 25, 2018, 05:40 UTC · re: Etienne d'Hautefeuille · lore

Re: git difftool with symlink to readonly jar failed

Hi,

On Thu, May 24, 2018 at 11:11 PM, Etienne d'Hautefeuille <sagoum.kakoum@gmail.com> wrote:

Show 6 quoted lines
>
> #try  a diff
> git difftool --dir-diff 4cb98b4a307ce97d9e6b8e4b03211fa5ca8af7e7
> 0244799661b993b1f78fa5afb621de3fe4c4a39c
> fatal: impossible d'ouvrir '/tmp/git-difftool.UQ4mqo/left/jenkins.war' en
> écriture: Permission non accordée
You should use LANG=C so that people can understand the error message.

Also git difftool launches another program that will actually perform the diff. It looks like it is bcompare on your setup. Did you try with another program?

Etienne d'Hautefeuille· May 25, 2018, 06:23 UTC · re: Christian Couder · lore

Re: git difftool with symlink to readonly jar failed

Hi,
same problem with all program, There is a crash before the launch
> git difftool --dir-diff 4cb98b4a307ce97d9e6b8e4b03211fa5ca8af7e7

0244799661b993b1f78fa5afb621de3fe4c4a39c -- fatal: could not open '/tmp/git-difftool.g80nLO/left/jenkins.war' for writing: Permission denied

> git difftool --dir-diff  --dir-diff --tool=kdiff3

4cb98b4a307ce97d9e6b8e4b03211fa5ca8af7e7 0244799661b993b1f78fa5afb621de3fe4c4a39c -- fatal: could not open '/tmp/git-difftool.R1NgMw/left/jenkins.war' for writing: Permission denied

> git difftool --dir-diff  --dir-diff --tool=bc3

4cb98b4a307ce97d9e6b8e4b03211fa5ca8af7e7 0244799661b993b1f78fa5afb621de3fe4c4a39c -- fatal: could not open '/tmp/git-difftool.MNyx8b/left/jenkins.war' for writing: Permission denied

> git difftool --dir-diff  --dir-diff --tool=kompare

4cb98b4a307ce97d9e6b8e4b03211fa5ca8af7e7 0244799661b993b1f78fa5afb621de3fe4c4a39c -- fatal: could not open '/tmp/git-difftool.lj82wR/left/jenkins.war' for writing: Permission denied

Le ven. 25 mai 2018 à 07:40, Christian Couder <christian.couder@gmail.com> a écrit :

> Hi,
Show 7 quoted lines
> On Thu, May 24, 2018 at 11:11 PM, Etienne d'Hautefeuille
> <sagoum.kakoum@gmail.com> wrote:
> >
> > #try  a diff
> > git difftool --dir-diff 4cb98b4a307ce97d9e6b8e4b03211fa5ca8af7e7
> > 0244799661b993b1f78fa5afb621de3fe4c4a39c
> > fatal: impossible d'ouvrir '/tmp/git-difftool.UQ4mqo/left/jenkins.war'
en
> > écriture: Permission non accordée
> You should use LANG=C so that people can understand the error message.
> Also git difftool launches another program that will actually perform
> the diff. It looks like it is bcompare on your setup. Did you try with
> another program?

← back to recent threads