question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Print shorter versions of git commit hashes in `dvc diff`

See original GitHub issue

Per https://github.com/iterative/dvc.org/pull/244#discussion_r275607398, requested by @shcheklein

Currently dvc diff outputs a line such as

dvc diff from 6a819f8fa053f124f6a5487efc824a8c17366c71 to 612f6caf5c5daeb172167db285efd8b169d41b60

with the full-length commit hashes. Can we just print the first 7 characters like Git and GitHub support?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jorgeorpinelcommented, Apr 19, 2019

Thanks Ivan!

I followed the contributing guide which was quite straightforward, thanks. This allowed me to test my small change locally and it seems it works. Here’s the PR: https://github.com/iterative/dvc/pull/1906

Regarding gitdb I do see it in the reqs of gitpython now, thanks. And it is a pretty outdated version it seems (0.6.4 while the latest is 2.0.5 atm) But still I can’t find the exc module in that old version’s API ref. Oh well, don’t really need that.

1reaction
shchekleincommented, Apr 19, 2019

@jorgeorpinel I think this a good starting point to setup dev environment - https://dvc.org/doc/user-guide/contributing

https://github.com/gitpython-developers/GitPython pulls gitdb with it. I’m not sure about the version though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

diff | Data Version Control - DVC
Prints a list of files and directories added, modified, renamed, or deleted in a Git commit b_rev as compared to another Git commit...
Read more >
Get the short Git version hash - Stack Overflow
A simple way to see the Git commit short version and the Git commit message is: git log --oneline. Note that this is...
Read more >
pretty-formats Documentation - Git
This line begins with "Merge: " and the hashes of ancestral commits are printed, separated by spaces. Note that the listed commits may...
Read more >
Data Version Control With Python and DVC - Real Python
In this tutorial, you'll learn to use DVC, a powerful tool that solves many problems encountered in machine learning and data science.
Read more >
git-log - man pages section 1: User Commands
Note that this affects all diff-based output types, e.g. Git 1.7.9.2 Last change: 02/22/2012 ... --no-merges Do not print commits with more than...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found