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

Re: Please discuss: what "git push" should do when you do not say what to push?

From
Joey Hess <joey@kitenet.net>
Date
Mar 17, 2012, 14:00 UTC
Message-ID
<20120317140030.GA27369@gnu.kitenet.net>
In-Reply-To
<7v7gyjersg.fsf@alter.siamese.dyndns.org>

I'd like to point out a use case for the current push behavior that has probably not been considered. I've written several tools that store data on subsidiary git branches.

One is pristine-tar, in which information necessarily to reconstruct bit-identical tarballs containing the source in (say) master is stored efficiently in the pristine-tar branch. Another is git-annex, in which bookeeping information about the actual location of large files is stored in the git-annex branch. These are not unlike git notes, other than not being built into git. I'm not the only one doing this, other examples I know of include several bug trackers (git-case, git-issues, ticgit).

The current push behavior works well for these subsidiary branches. But if users have to remember to manually push these branches, which they do not otherwise manually interact with, they'll forget. I know this will be confusing, because with current git, users have to be instructed to push these branches *once*, to get the tracking set up.

I feel that this use of subsidiary branches expands the reach of git; there are reasons that Fossil is pulling other ancillary data (bugs, wiki, blog etc) into DVCS. But it makes the mistake, IMHO, of bundling all that together into one peice of software. Git allows doing the same things, but loosely coupled, so the best implementation of each can win.

There might be some way to handle such subsidiary branches while still changing the push default. If git prints a good enough warning about other, unpushed matching branches, the user only has to do a little more work to push them. If a hook was available that could add branches to the set to be pushed, it could automate pushing such branches. Or git could get a way to mark one branch as a subsidiary branch of another, and automatically include subsidiaries in pushes.

-- 
see shy jo
Previous: Matthieu MoyNext: Junio C Hamano
Message 25 of 43 in “Please discuss: what "git push" should do when you do not say what to push?”
  1. Junio C HamanoMar 17, 2012
  2. Junio C HamanoMar 17, 2012
  3. Andrew SayersMar 17, 2012
  4. Junio C HamanoMar 18, 2012
  5. Ævar Arnfjörð BjarmasonMar 18, 2012
  6. Junio C HamanoMar 19, 2012
  7. Sebastien DoucheMar 19, 2012
  8. Andrew SayersMar 19, 2012
  9. Junio C HamanoMar 19, 2012
  10. demerphqMar 19, 2012
  11. Junio C HamanoMar 19, 2012
  12. Andreas EricssonMar 20, 2012
  13. Andrew SayersMar 19, 2012
  14. Junio C HamanoMar 19, 2012
  15. Andrew SayersMar 20, 2012
  16. Junio C HamanoMar 20, 2012
  17. Andrew SayersMar 20, 2012
  18. Junio C HamanoMar 21, 2012
  19. Martin LanghoffMar 20, 2012
  20. Junio C HamanoMar 20, 2012
  21. Martin LanghoffMar 20, 2012
  22. Jakub NarebskiMar 20, 2012
  23. Summary of discussion on "git push" default changeJunio C Hamano, Mar 21, 2012
  24. Matthieu MoyMar 21, 2012
  25. Joey HessMar 17, 2012
  26. Junio C HamanoMar 19, 2012
  27. fREW SchmidtMar 17, 2012
  28. H. Peter AnvinMar 18, 2012
  29. Marcus D. HanwellMar 18, 2012
  30. Sebastian SchuberthMar 18, 2012
  31. Peter KreftingMar 19, 2012
  32. Letting remote repositories override local configurationJonathan Nieder, Mar 19, 2012
  33. Peter KreftingMar 19, 2012
  34. Kevin BallardMar 19, 2012
  35. Antony MaleMar 20, 2012
  36. Jakub NarebskiMar 20, 2012
  37. Antony MaleMar 20, 2012
  38. Nathan GrayMar 20, 2012
  39. Ben TebulinMar 20, 2012
  40. Ben TebulinMar 20, 2012
  41. Ben TebulinMar 20, 2012
  42. Ben TebulinMar 20, 2012
  43. Filipe FernandesMar 20, 2012

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.