mrgit icon indicating copy to clipboard operation
mrgit copied to clipboard

mgit --watch

Open pjasiun opened this issue 8 years ago • 4 comments

Since I always forget to change mgit.json/package.json while I develop and whenever I ask someone to check my branch I need to give him the whole list of branches I realized that the mgit --watch tool would be very useful. It would watch all subbranches and whenever branch changes its saves it to the mgit.json or package.json (see https://github.com/cksource/mgit2/issues/29).

pjasiun avatar Mar 21 '17 13:03 pjasiun

I'm not sure this is actually feasible. Unless there's some file in .git/ that we can watch with the fs watcher.

Other than that, it's an interesting feature request. Although, I'm afraid that it wouldn't be very popular and requiring one to launch mgit --watch would be annoying. You can forget doing this too.

Reinmar avatar Mar 21 '17 14:03 Reinmar

Alternatively, mgit could install some git hook in the child repositories, so whenever you checkout something there, it updates the parent project. This would be more convenient.

Reinmar avatar Mar 21 '17 14:03 Reinmar

I'm not sure this is actually feasible. Unless there's some file in .git/ that we can watch with the fs watcher.

> cat .git/HEAD
ref: refs/heads/master
> cat .git/refs/heads/master
55e1fbe0cd4ebacf55026c6d18801044cb313ba4

Tadam!

pjasiun avatar Mar 21 '17 14:03 pjasiun

Alternatively, mgit could install some git hook in the child repositories, so whenever you checkout something there, it updates the parent project. This would be more convenient.

Sounds cool too.

Although, I'm afraid that it wouldn't be very popular and requiring one to launch mgit --watch would be annoying. You can forget doing this too.

Well, on the other hand, it's nice that you can enable it whenever you want, but if you do not need it you can turn it off and no one is chaning your *.json files.

pjasiun avatar Mar 21 '17 14:03 pjasiun