Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sno show/diff doesn't work for initial import commits #44

Closed
craigds opened this issue Apr 7, 2020 · 3 comments · Fixed by #53
Closed

sno show/diff doesn't work for initial import commits #44

craigds opened this issue Apr 7, 2020 · 3 comments · Fixed by #53
Assignees

Comments

@craigds
Copy link
Member

craigds commented Apr 7, 2020

There doesn't seem to be a way to view the content of an import commit.

Behold a fledgling sno repository:

$ sno log
commit 736a79dcb844a55e88813635b3535dd227635a87 (HEAD -> master)
Author: Craig de Stigter <[email protected]>
Date:   Tue Apr 7 13:55:50 2020 +1200

    Import from manawatu-whanganui-palmerston-north-lidar-index-tiles-2018.gpkg to /manawatu_whanganui_palmerston_north_lidar_index_tiles_2018/

None of the following commands produce much to show the commit's contents:

cdestigter@behindyou  $ sno diff 736a79dcb844a55e88813635b3535dd227635a87
cdestigter@behindyou  $ sno diff HEAD^..HEAD
Usage: sno diff [OPTIONS] [ARGS]...

Error: Invalid value for commit: Invalid commit spec
cdestigter@behindyou  $ sno show
commit 736a79dcb844a55e88813635b3535dd227635a87 (HEAD -> master)
Author: Craig de Stigter <[email protected]>
Date:   Tue Apr 7 13:55:50 2020 +1200

    Import from manawatu-whanganui-palmerston-north-lidar-index-tiles-2018.gpkg to /manawatu_whanganui_palmerston_north_lidar_index_tiles_2018/
@craigds
Copy link
Member Author

craigds commented May 5, 2020

the linked PR doesn't actually quite fix this yet - we still need to resolve X^ to the empty-tree ref everywhere, when X refers to the first commit.

@craigds craigds reopened this May 5, 2020
@olsen232
Copy link
Collaborator

olsen232 commented May 5, 2020

X^ still doesn't refer to the empty tree everywhere - git doesn't actually do this either. Not sure if it's a good behaviour to implement or not.

But, git show <initial_commit> now shows the initial commit including a diff <empty_tree>..<initial_commit>. So that part works

@craigds
Copy link
Member Author

craigds commented May 5, 2020

👍 fixed via 222f1ce

@craigds craigds closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants