amtoine/nu-git-manager

add diff when updating cache manually

Open

#43 opened on Oct 27, 2023

 (0 comments) (0 reactions) (0 assignees)Nushell (1 fork)auto 404
coreenhancementgood first issue

Repository metrics

Stars
 (32 stars)
PR merge metrics
 (PR metrics pending)

Description

let's say i update repos of my store manually:

  • i git init a repo called manual/foo
  • i git init a repo called manual/bar
  • i rm a repo called auto/baz

when i run gm update-cache to remove auto/baz from it and add manual/foo and manual/bar to it, i think it would be cool to have an output like the following:

> gm update-cache
updating cache... done
#┬───name───┬status─
0│manual/foo│added
1│manual/bar│added
2│auto/baz  │removed
─┴──────────┴───────

this implies that the signature of gm update-cache would change a bit from

"gm update-cache" []: nothing -> nothing

to

"gm update-cache" []: nothing -> table<name: string, status: string>

Contributor guide