Re: How to figure out what 'git push' would do?
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Aug 5, 2007, 22:09 UTC
- Message-ID
- <20070805220902.GB3159@steel.home>
- In-Reply-To
- <515E28B6-85AF-4379-870A-CFECF19B74DE@zib.de>
Steffen Prohaska, Sun, Aug 05, 2007 21:56:37 +0200:
Show 11 quoted lines
> > > > $ git fetch > > $ gitk local..REPO/master > > > > That applies only for a single branch. If I prepared a couple of > branches for pushing and somehow want to double check what I prepared, > 'git push --dry-run' would be quite handy. I know how to handle the > situation and could write a custom script that does all necessary > checks. But I haven't found an out-of-the-box solution for double > checking right before 'git push'
Well, you can do gitk local1..REPO/remote1 local2..REPO/remote2, of course, but yes, there is not out-of-the-box solution.
And a straight-forward implementation of "git-push --dry-run" doesn't look simple... The remote sides git-receive-pack still have to be called for any useful information, like the references updated and the SHA-1s they get. IOW, if you can update your system easily to support --dry-run, it still does not mean the server admin will do that just as readily. And AFAICS, receive-pack dies if given a parameter it does not know (it dies on every command line argument which begins with "-", as it looks). Maybe we should change that first for a very slow start...
It is simplier to modify git-ls-remote of git-remote to just compare reference on local and remote side.