Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Properly fetch the article file path relative to git directory's parent #15

Merged
merged 1 commit into from
Jan 21, 2014

Conversation

parkr
Copy link
Contributor

@parkr parkr commented Jan 21, 2014

As I was running v0.2.0 on my personal site, I kept getting this (debug message mine):

git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- /tmp/parkermoore.de/portfolio.html
fatal: /tmp/parkermoore.de/portfolio.html: '/tmp/parkermoore.de/portfolio.html' is outside repository
git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- /tmp/parkermoore.de/404.md
fatal: /tmp/parkermoore.de/404.md: '/tmp/parkermoore.de/404.md' is outside repository
git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- /tmp/parkermoore.de/projects.md
fatal: /tmp/parkermoore.de/projects.md: '/tmp/parkermoore.de/projects.md' is outside repository
git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- /tmp/parkermoore.de/resume.md
fatal: /tmp/parkermoore.de/resume.md: '/tmp/parkermoore.de/resume.md' is outside repository
git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- /tmp/parkermoore.de/index.md
fatal: /tmp/parkermoore.de/index.md: '/tmp/parkermoore.de/index.md' is outside repository

Turns out the filename after the -- has to be the relative path from the git directory's parent. With the attached changes, I successfully achieved the output I was looking for:

git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- portfolio.html
git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- 404.md
git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- projects.md
git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- resume.md
git --git-dir /tmp/parkermoore.de/.git log --format="%ct" -- index.md

No error messages, yay!

@gjtorikian
Copy link
Owner

🍰

gjtorikian added a commit that referenced this pull request Jan 21, 2014
Properly fetch the article file path relative to git directory's parent
@gjtorikian gjtorikian merged commit a000e7a into gjtorikian:master Jan 21, 2014
@parkr parkr deleted the patch-1 branch January 21, 2014 23:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants