I've been trying to understand the difference between these two commands and noticed that I get different results.
apt-get install -t testing appX apt-get install appX/testing
I setup my sources lists and pinning config as per https://serverfault.com/a/382101/132528
root@home:/etc/apt# apt-cache policy i3 i3: Installed: (none) Candidate: 4.2-2 Version table: 4.8-1 0 750 http://debian.mirror.ac.za/debian/ testing/main amd64 Packages 750 http://ftp.us.debian.org/debian/ testing/main amd64 Packages 50 http://debian.mirror.ac.za/debian/ unstable/main amd64 Packages 50 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages 4.8-1~bpo70+1 0 100 http://debian.mirror.ac.za/debian/ wheezy-backports/main amd64 Packages 4.2-2 0 995 http://debian.mirror.ac.za/debian/ wheezy/main amd64 Packages 995 http://debian.mirror.ac.za/debian/ stable/main amd64 Packages 995 http://ftp.us.debian.org/debian/ stable/main amd64 Packages
It chooses 4.2-2, when doing
apt-get install -t testing appX
And chooses 4.8 when doing
apt-get install appX/testing
To tell apt-get to use a specific distribution when searching for upgraded packages, you need to use the -t or --target-release option, followed by the name of the distribution you want (for example: apt-get -t stable upgrade).
If the file sources.list mentions several distributions, it is possible to give the version of the package to install. A specific version number can be requested with apt-get install package=version, but indicating its distribution of origin (Stable, Testing or Unstable) — with apt-get install package/distribution — is usually preferred.
In both cases you specify the distribution you want, but the behaviour at hand is not consistent between the two cases?