git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 10/10] push: teach push to be quiet if local ref is strict subset of remote ref

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 2, 2007, 07:52 UTC
Message-ID
<7vk5p15bkv.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<63FCD695-B952-4624-854C-0F1C662D94D1@zib.de>
Steffen Prohaska <prohaska@zib.de> writes:
Show 7 quoted lines
> On Nov 1, 2007, at 9:18 PM, Junio C Hamano wrote:
>
>> The context of this "forced" is that you say (in the following
>> paragraph) the user's main objective was to "push", but I do not
>> think "to push" is ever the main objective.
>
> Right. I should probably describe a bit more of the context.
Boring ;-)
> We have a shared branch for a group of developer who are located
> ...
> In this setting a user really want to push. Because only then
> the code will be tested and available for all others. ...

Pretty much expected, sane, and unsurprising. Then you are in the first category I quoted, and...

>>  - If it is to give integrated result for others to work further
>>    on, then you need to resolve before being able to achieve
>>    that goal.  There is no escaping from it.

... it still holds that what the developer wants to do is not just "to push", but "to push after making sure what he is going to push is in a good enough shape to be pushed". Your _workflow_ is forcing to integrate right away before pushing; don't blame git for this.

Show 19 quoted lines
>>  - On the other hand, if it is to show what you did as early as
>>    possible in a working shape, and if the updated shared
>>    repository has changes from somebody else that conflicts you,
>>    in a CVS/SVN style shared workflow, there is no way for you
>>    to show what you did in isolation.  If you try to follow that
>>    model in git and insist pushing to the same branch, then you
>>    are forced to resolve first.
>>
>>    But you do not have to.  You could push out to another new
>>    branch, and say "Here is how you could do it, although this
>>    is based on an older codebase and conflicts with what
>>    recently happened to the tip".  You could even ask other
>>    party whose changes conflict with yours to help with the
>>    merge by saying "I pushed it out, you are more familiar with
>>    that area of the code and with your changes near the tip of
>>    the trunk, so could you merge it and push out the result?"
>
> ... I know we could use git to establish a more complex workflow
> that would give better guarantees on the published branches.

Don't get me wrong. You do not always have to use the "push to a side branch and ask for help from others", but git opens the door for you to do so more conveniently, rather than strictly sticking to the CVS workflow. I re-quoted the whole "On the other hand" part because I think this is something not often done by people with CVS background --- with CVS you can do exactly the same thing but it is too cumbersome and people don't do so in practice. With git, such an interaction is not just possible but is a very natural thing to do.

Your more advanced people can be the first ones to employ this "new communication medium" to help work better among them. You do not have to force the "side communication" as an official part of workflow to the whole group.

SCM is just a tool to help developer communication. Use it wisely.

> We haven't figured out much more of our workflow. The first
> milestone is to migrate from CVS to git continuing to use a
> CVS-style workflow.

I think that is an interesting admission. As somebody else on the thread already said, if you are sticking to CVS workflow, there are things that can and cannot be naturally done with git. Don't break git when you hit the situation in the latter category without understanding how the world works.

> error: remote 'refs/heads/master' is ahead of local 'refs/heads/
> master'. Use --verbose for more details.
I'd rather have "Read section XXX of the user's guide".
Previous: Steffen ProhaskaNext: Steffen Prohaska
Message 29 of 53 in “improve refspec handling in push”
  1. 0/10 improve refspec handling in pushSteffen Prohaska, Oct 28, 2007
  2. 01/10 push: change push to fail if short refname does not existSteffen Prohaska, Oct 28, 2007
  3. 02/10 push: teach push new flag --createSteffen Prohaska, Oct 28, 2007
  4. 03/10 push: support pushing HEAD to real branch nameSteffen Prohaska, Oct 28, 2007
  5. 04/10 push: add "git push HEAD" shorthand for 'push current branch to default repo'Steffen Prohaska, Oct 28, 2007
  6. 05/10 rename ref_matches_abbrev() to ref_abbrev_matches_full_with_fetch_rules()Steffen Prohaska, Oct 28, 2007
  7. 06/10 add ref_abbrev_matches_full_with_rev_parse_rules() comparing abbrev with full ref nameSteffen Prohaska, Oct 28, 2007
  8. 07/10 push: use same rules as git-rev-parse to resolve refspecsSteffen Prohaska, Oct 28, 2007
  9. 08/10 push: teach push to accept --verbose optionSteffen Prohaska, Oct 28, 2007
  10. 09/10 push: teach push to pass --verbose option to transport layerSteffen Prohaska, Oct 28, 2007
  11. 10/10 push: teach push to be quiet if local ref is strict subset of remote refSteffen Prohaska, Oct 28, 2007
  12. Junio C HamanoOct 30, 2007
  13. Steffen ProhaskaOct 30, 2007
  14. Andreas EricssonOct 30, 2007
  15. Steffen ProhaskaOct 30, 2007
  16. Junio C HamanoOct 30, 2007
  17. Steffen ProhaskaOct 31, 2007
  18. Junio C HamanoOct 31, 2007
  19. Junio C HamanoOct 31, 2007
  20. Steffen ProhaskaOct 31, 2007
  21. Junio C HamanoOct 31, 2007
  22. Steffen ProhaskaOct 31, 2007
  23. Junio C HamanoOct 31, 2007
  24. Steffen ProhaskaNov 1, 2007
  25. Andreas EricssonNov 1, 2007
  26. Steffen ProhaskaNov 1, 2007
  27. Junio C HamanoNov 1, 2007
  28. Steffen ProhaskaNov 2, 2007
  29. Junio C HamanoNov 2, 2007
  30. Steffen ProhaskaNov 2, 2007
  31. Junio C HamanoNov 2, 2007
  32. Steffen ProhaskaNov 2, 2007
  33. Andreas EricssonNov 2, 2007
  34. Tom PrinceNov 2, 2007
  35. Andreas EricssonNov 2, 2007
  36. Steffen ProhaskaNov 2, 2007
  37. Junio C HamanoNov 2, 2007
  38. Junio C HamanoNov 2, 2007
  39. Andreas EricssonNov 1, 2007
  40. Steffen ProhaskaNov 1, 2007
  41. Andreas EricssonNov 1, 2007
  42. Wincent ColaiutaNov 2, 2007
  43. Johannes SchindelinNov 2, 2007
  44. Steffen ProhaskaNov 2, 2007
  45. Wincent ColaiutaNov 2, 2007
  46. Daniel BarkalowOct 30, 2007
  47. Junio C HamanoOct 30, 2007
  48. Steffen ProhaskaOct 30, 2007
  49. Junio C HamanoOct 30, 2007
  50. Junio C HamanoOct 30, 2007
  51. Junio C HamanoOct 30, 2007
  52. Steffen ProhaskaOct 30, 2007
  53. Junio C HamanoOct 30, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.