dgit icon indicating copy to clipboard operation
dgit copied to clipboard

Pushing to a repository ahead in time causes panic

Open henesy opened this issue 7 years ago • 0 comments

If I push to a repository that's ahead in commits while local is behind dgit will crash:

sav% git push master
origin  on  https://github.com/henesy/Practice-Code
Username: henesy
Password: 
report-status
delete-refs
side-band-64k
quiet
atomic
ofs-delta
agent=git/github-g8e539663647e

Refname: refs/heads/master Remote Sha1: 98833bb3f14fd6093e73fa4cc2c1947280a1c4e3 Local Sha1: b12040419cbbfb4c574767c9aaa5e73770338010
panic: ^98833bb3f14fd6093e73fa4cc2c1947280a1c4e3:Invalid revision commit

goroutine 1 [running]:
github.com/driusan/dgit/cmd.Push(0x420870bd0, 0x420870080, 0x1, 0x1)
	/usr/henesy/go/src/github.com/driusan/dgit/cmd/push.go:52 +0xf25
main.main()
	/usr/henesy/go/src/github.com/driusan/dgit/main.go:183 +0x24ab

Since pull/merge isn't implemented there's no way to sync up, that's okay though.

Should this be handled rather than causing a panic?

henesy avatar Mar 06 '18 19:03 henesy