git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-submodule/before-rebase hook
@ 2008-11-18  3:59 justin
  2008-11-18  7:47 ` Andreas Ericsson
  0 siblings, 1 reply; 2+ messages in thread
From: justin @ 2008-11-18  3:59 UTC (permalink / raw)
  To: git

I just discovered git-submodule today, and already I can see it making  
my life a lot easier. I develop several modules that are used in two  
different projects, and being able to check in changes from the  
submodule in either project is something I have been wanting to do for  
a while. But there is one shortcoming in git-submodule that I haven't  
figured out how to overcome... yet.

When I make a change to a submodule and push that change to the parent  
repository, the change appears to all other users of the repository as  
a modification to the submodule commit version. A few people at our  
company use 'git ci -a' to add all of their changes, and I'm afraid  
they are going to unknowingly revert the submodule back to a previous  
version. So my plan was to add a post-pull hook that does 'git  
submodule update --init', so that people who don't do development on  
the submodule will get updates every time they pull. Unfortunately  
though, there is no such hook in git. I thought post-merge was going  
to work, but most people at our company use 'git pull --rebase', and  
post-merge isn't called in that case. The post-checkout hook is  
called, but the pull hasn't been completed at that point, so updating  
the submodule doesn't work. Alas, if only there was a post-rebase hook.

Any ideas other than patching every employee's git source to add a  
post-rebase hook?

Thanks,
Justin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-18  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-18  3:59 git-submodule/before-rebase hook justin
2008-11-18  7:47 ` Andreas Ericsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).