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

Re: Subtree in Git

From
Paul Campbell <pcampbell@kemitix.net>
Date
Mar 4, 2013, 22:33 UTC
Message-ID
<CALeLG_mMMZ2Gh=mz_EQceTaqi9XK1ty2SaCbH5x23zsS1Wu1Dg@mail.gmail.com>
In-Reply-To
<CALeLG_=Yy0TkY-vY8AE9CtXhs4zF8kjdQBNdp+N4yhFmHM79RA@mail.gmail.com>
On Sat, Mar 2, 2013 at 5:43 PM, Paul Campbell <pcampbell@kemitix.net> wrote:
Show 41 quoted lines
> On Sat, Mar 2, 2013 at 11:21 AM, David Michael Barr <b@rr-dav.id.au> wrote:
>> On Sat, Mar 2, 2013 at 9:05 AM, Paul Campbell <pcampbell@kemitix.net> wrote:
>>> On Fri, Mar 1, 2013 at 2:28 AM, Kindjal <kindjal@gmail.com> wrote:
>>>> David Michael Barr <b <at> rr-dav.id.au> writes:
>>>>
>>>>> From a quick survey, it appears there are no more than 55 patches
>>>>> squashed into the submitted patch.
>>>>> As I have an interest in git-subtree for maintaining the out-of-tree
>>>>> version of vcs-svn/ and a desire to improve my rebase-fu, I am tempted
>>>>> to make some sense of the organic growth that happened on GitHub.
>>>>> It doesn't appear that anyone else is willing to do this, so I doubt
>>>>> there will be any duplication of effort.
>>>>>
>>>>
>>>> What is the status of the work on git-subtree described in this thread?
>>>> It looks like it's stalled.
>>>>
>>>
>>> I hadn't been aware of that patch. Reading the thread David Michael
>>> Barr was going to try picking the patch apart into sensible chunks.
>>>
>>
>> Sorry for not updating the thread. I did end up moving onto other things.
>> I quickly realised the reason for globbing all the patches together was
>> that the individual patches were not well contained.
>> That is single patches with multiple unrelated changes and multiple
>> patches changing the same things in different directions.
>> To me this means that the first step is to curate the history.
>>
>>> If this work is still needing done I'd like to volunteer.
>>
>> You're most welcome. Sorry again for abandoning the thread.
>>
>> --
>> David Michael Barr
>
> Okay, I'll start picking the patch apart this week then feedback when
> I have a plan to tackle it all.
>
> --
> Paul [W] Campbell
>From a comparison of the tip for helmo's subtree-updates branch and

the current master these are the changes and features that the patch is providing. I've listed the changes briefly per file, with a note of the general action I plan to take. This is based on a simple diff, so some changes are actually reversions to recent commits, which I have tried to note.

Makefile
	* Regresses two recent commits (8165be064e and d86848228f)
	* ACTION: Ignore file
README.md
	* Adds a markdown readme file (that github likes to have in root)
	* Includes some install instructions in a pseudo man page format
	* The INSTALL file covers all the information contained and is more up-to-date
	* ACTION: Ignore file
git-subtree.sh
	* OPTS_SPEC
		* pull/push: options for repository and refspec are both optional,
[<repository> [<refspec>]]
		* new sub-command: pull-all
		* new sub-command: push-all
		* new sub-command: list
		* new sub-command: from-submodule
		* new sub-command: prune
		* new sub-command: diff
		* new option for push: --force
	* Trailing slash on prefix is removed
	* Different pretty log format in cmd_commit getting piped to set some
environment variables
		* Would revert: a5b8e28e4e
		* Ignoring this change
	* Removes all tests in cmd_add to check that refspec is valid
		* I've posted a patch with new tests to the list recently that would
go in here
	* Change reference to 'commit' into 'refspec' in error message in cmd_add
	* Stores subtree metadata in .gittrees as:
		[subtree "$dir"]
			url = $repository
			path = $dir
			branch = $refspec
	* Inadvertently commited a change to the linefeed character in
cmd_split for the activity indicator
	* cmd_pull/cmd_push: reads options from .gitrees if not provided on
the command line
	* Implementation of cmd_diff
		* fetches remote repo as a temporary git-remote then uses
git-diff-tree to compare before removing the temporary git-remote
	* Implementation of cmd_list as plain wrapper to new functions subtree_list
		* Iterates over subtrees listed in .gittrees and prints out their details
		* Dubious about greps used to get list from .gittrees
	* Implementation of cmd_from-submodule
		* Converts a git-submodule into a git-subtree
	* Implementation of cmd_prune
		* Removes entries from .gittrees where the $dir is missing
		* Dubious about greps used to get list from .gittrees
	* Implementation of cmd_pull-all
		* Performs a git-subtree pull for each subtree
		* Dubious about greps used to get list from .gittrees
	* Implementation of cmd_push-all
		* Perfroms a git-subtree push for each subtree
		* Dubious about greps used to get list from .gittrees
git-subtree.txt
	* Adds brief descriptions for commands:
		* pull-all
		* push-all
		* list
		* from-submodule
		* prune
		* diff ("TO BE DOCUMENTED")
	* Notes optional -f|--force for push sub-command
	* fixes a typo in text for Example 1 (s/incldued/included/)
t/t7900.sh
	* Add numeric comments for each test
		* recently removed (144797d720) in master so don't add them back
	* ACTION: Ignore file
test.sh
	* Legacy tests
	* ACTION: Ignore file

My next step will be to find the commits (from helmo's subtree-updates-merged branch) that provide the features above that I want to keep and cherry-pick them into a new branch (or two).

-- 
Paul [W] Campbell
Previous: Paul CampbellNext: dag@cray.com
Message 32 of 35 in “Subtree in Git”
  1. Hilco WijbengaApr 27, 2012
  2. dag@cray.comApr 27, 2012
  3. Hilco WijbengaApr 27, 2012
  4. Herman van RinkMay 1, 2012
  5. greened@obbligato.orgMay 4, 2012
  6. Herman van RinkMay 4, 2012
  7. Junio C HamanoMay 5, 2012
  8. dag@cray.comMay 7, 2012
  9. Herman van RinkMay 7, 2012
  10. dag@cray.comMay 7, 2012
  11. Junio C HamanoMay 11, 2012
  12. dag@cray.comMay 23, 2012
  13. greened@obbligato.orgJun 12, 2012
  14. Herman van RinkJun 13, 2012
  15. dag@cray.comJul 11, 2012
  16. Herman van RinkOct 20, 2012
  17. Junio C HamanoOct 21, 2012
  18. Herman van RinkOct 21, 2012
  19. Junio C HamanoOct 21, 2012
  20. Herman van RinkOct 21, 2012
  21. dag@cray.comOct 22, 2012
  22. dag@cray.comOct 22, 2012
  23. dag@cray.comOct 22, 2012
  24. Herman van RinkOct 26, 2012
  25. David Michael BarrOct 26, 2012
  26. James NylenOct 26, 2012
  27. dag@cray.comOct 29, 2012
  28. KindjalMar 1, 2013
  29. Paul CampbellMar 1, 2013
  30. David Michael BarrMar 2, 2013
  31. Paul CampbellMar 2, 2013
  32. Paul CampbellMar 4, 2013
  33. dag@cray.comOct 29, 2012
  34. Daniel KoesterMay 4, 2012
  35. greened@obbligato.orgJun 12, 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.