git log restricted to path doesn't show expected commit -
i noticed behavior of git don't understand in this repository. can cloned via:
git clone "git@github.com:skript-sicherheit/skript.git"
if navigate folder images
in terminal , execute git log .
, prints this:
commit b1703a7542ee226535a34bd3de9aed48a7f76a8d author: lukas beeck <meisterasrael@googelmail.com> date: wed sep 7 10:37:39 2016 +0200 bild von mona lisa war verschwunden, ist wieder drin commit 0e3ede155080a3005e6454d855e18dc0083ea01a author: lukas beeck <meisterasrael@googelmail.com> date: fri sep 2 10:20:25 2016 +0200 erläuterung in grafik eingefügt [...]
git show b1703a7542ee226535a34bd3de9aed48a7f76a8d
prints:
commit b1703a7542ee226535a34bd3de9aed48a7f76a8d author: lukas beeck <meisterasrael@googelmail.com> date: wed sep 7 10:37:39 2016 +0200 bild von mona lisa war verschwunden, ist wieder drin diff --git a/images/mona-lisa.jpg b/images/mona-lisa.jpg new file mode 100644 index 0000000..f4f5583 binary files /dev/null , b/images/mona-lisa.jpg differ
the commit message german for: "image of mona lisa had vanished. in again."
so clearly, file mona-lisa.jpg
changed b1703a7542ee226535a34bd3de9aed48a7f76a8d
. file changed it.
but if execute git log mona-lisa.jpg
, (entire) output:
commit 669b00871f3dba5c43ac7d53e44f317a61b177d0 merge: 921a31c 519cdae author: lukas beeck <meisterasrael@googelmail.com> date: fri sep 2 15:39:00 2016 +0200 merge branch 'index'
why doesn't b1703a7542ee226535a34bd3de9aed48a7f76a8d
appear in output of command?
more of comment satisfactory answer, looks strange sequence of events in repository. can, situation:
master | .. -> -> b -> [e] (mona lisa) -> .. -> [h] | / / index | .. -> c -> d / | / seitenkanalgriffe | .. -> f (mona lisa) -> g
it seems reason, mona lisa image added in merge commit e
; guess maybe untracked image accidentally in directory @ time , added error.
the actual branch seems have been intentionally committed in, seitenkanalgriffe
branch, not merged until h
.
the git log documentation when specifying path states:
[--] <path>…
show commits enough explain how files match specified paths came be. see history simplification below details , other simplification modes.
paths may need prefixed ‘`-- '’ separate them options or revision range, when confusion arises.
since important commit in terms of file history e
, commit introduced image, , h
made no changes file, see e
when running git log mona-lisa.jpg
. e
commit "merge branch 'index'" comment mention in question.
to further confuse things, if use git log --follow images/mona-lisa.jpg
, see commit h
, because won't follow file in merges default. you'll have run git log --follow -m images/mona-lisa.jpg
see commits e
, h
listed.
that @ least, understanding of going on here, there may else blame.
Comments
Post a Comment