dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Push Message is incomplete

Open macneale4 opened this issue 1 year ago • 0 comments

Currently when you push changes to a dolt server (DoltHub or Dolt SQL Server), the message presented to the user is incomplete and incorrect.

For example, if you push change to an existing branch, it will say "[new branch]", where as git will say something like:

Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
To /tmp/dir/remote
   92e4bcc..dc19dca  HEAD -> br1 

Also, tags are not considered special, so when you push a new tag, it says "[new branch]".

Another detail which is lost currently is if you provide the "--force" flag, you don't see the force in the output. Again, git does this:

lcl:/tmp/dir/local$ git push --force origin mytag
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 184 bytes | 184.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
To /tmp/dir/remote
 + dc19dca...2db8fb5 mytag -> mytag (forced update)

notice that's a tag, not a commit. Dolt doesn't seem to handle forced updates of tags at all currently. The message is the same for commits (in git, again, this doesn't work in dolt).

The commits before and after the update are unknown to the dolt code because we construct the message several layers above there the information exists. We need to refactor a bunch of the push/fetch arcitecture to get the data out that we need, so creating a tracking ticket for this.

See: https://github.com/dolthub/dolt/pull/7233

Note that these messages come from the stored procedure, so this is both a CLI and a SQL user experience issue.

macneale4 avatar Jan 02 '24 22:01 macneale4