Re: Cleaning up git user-interface warts
- From
Junio C Hamano <junkio@cox.net>
- Date
- Nov 17, 2006, 07:32 UTC
- Message-ID
- <7v64dev88t.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <f2b55d220611162242s48dc42d6g4cbfd9173e712ff8@mail.gmail.com>
"Michael K. Edwards" <medwards.linux@gmail.com> writes:
> Presumably "git branch -D" should inspect everything under > .git/remotes to see whether one or more Pull: lines need to be > deleted along with the branch.
I am not sure what you mean. .git/remotes files do not describe any relationship between local branches (and that is where one of the problem raised in recent thread -- pull does not notice on which branch you are on and change its behaviour depending on it), so I do not think there is anything gained for "git branch -D" by going through them.
> Currently, it looks like "remotes" entries are > created only by "git clone" or by hand. Junio, are there any plans to > manage the contents of "remotes" through the tool instead of by hand?
I muttered something in a near-by thread
Message-ID: <7vr6w78b4x.fsf@assigned-by-dhcp.cox.net>
I am reasonably sure a separate tool (what I tentatively called "maint-remote" in the message) is necessary, because, while it would be relatively easy to make "git fetch" and friends to add new mappings in the default way under a new option, people with different workflows would want differnt "default mappings", and adding new mappings for _all_ remote branches is useful only for people who work in one particular way (namely, the CVS-style "the central distribution point is where everybody meet" model).
The tool, under "interactive" mode, would probably take one parameter, the short name of a remote ($name), and would give you a form to update its URL:, shows ls-remote output against that repository and would let you:
- update the URL: which would probably cause the ls-remote to be re-run;
- remove existing mappings;
- add mappings for a remote branch for which you do not have a corresponding tracking branch, with a straightforward default mapping:
refs/heads/$branch:refs/remotes/$name/$branch
But I haven't thought things through yet.