git-fat
git-fat copied to clipboard
fat pull/push in git hooks?
Is there any reason why the "git fat push" and "git fat pull" commands have not been put into git hooks and are executed automatically?
E.g. execute git fat push before any git push command and execute git fat pull after each checkout?
I recommend it if it fits your workflow, but correct behavior with multiple remotes is workflow-dependent and avoiding conflicts with other hooks may be problematic. I consider hooks to be for the user and think it is inappropriate for a tool like git-fat to tamper with them. Do others think it is
- something that can be done safely and correctly in all cases, and
- something that git-fat should be doing?
Ok, thank you! Just wanted to make sure that there is no hidden problem, why this approach would not work at all.
Do others think it is
something that can be done safely and correctly in all cases, and something that git-fat should be doing?
I don't think that git-fat can be do this correctly under all circumstances, so I also don't think git-fat should be setting the hooks.
That said, we are probably going to integrate with hooks, primarily this allows GUI integration to work properly where GUIs just know how to change branches etc.
Counter to my previous comments, I intend on submitting git-fat hooks for push and pull.
The driving factor is GUI integration. If git fat push and pull can be automated as part of the usual git process then GUI tools are transparent to the requirement of using git fat.
So bundle some suggested hooks, but don't automatically install them? Or what do you have in mind?
Duane Murphy [email protected] writes:
Counter to my previous comments, I intend on submitting git-fat hooks for push and pull.
The driving factor is GUI integration. If git fat push and pull can be automated as part of the usual git process then GUI tools are transparent to the requirement of using git fat.
Reply to this email directly or view it on GitHub: https://github.com/jedbrown/git-fat/issues/41#issuecomment-50915613
I like the idea of bundling working hooks, with optional install.
There is no post-pull hook. The only way would be the post-merge hook (a pull that is not a noop will include a merge). But you don't want to invoke git-fat on local merges, so that is not ideal.