Aaron Bentley wrote:How that works with branching point, and with merges? For example in the case depicted below, how you refer to commit marked by X? ---- time ---> --*--*--*--*--*--*--*--*--*-- <branch> \ / \-*--X--*--/ The branch it used to be on is gone... Besides, in git commit object has pointers (in the form of sha1 ids) to all its parents. So <ref>^ (parent of <ref>), or <ref>^<m> (m-th parent of <ref>), or <ref>~<n> (n-th parent in 1st-parent lineage of <ref>) are natural, and fast. <ref>+<n> (which would add yet another character as forbidden in branch name) would need either serial number (per repository or per branch) to commit id database, or getting full history and looking it up in full history. Branches in git are remembered not by their starting points, but by their tips (ending points). Git could do that too, by having file (files) with serial number or branch/tag+serial number to commit id mapping. But this would have to be local matter. And this would take some disk space, and would seriously affect fetch performance (now git just downloads what it doesn't have and dumps it into repository database). BTW. what if repository is moved from one URL to another, for example moving to different host? All "abstracted away" identifiers get invalidated? Two words: post-commit hook. You can automate action of adding tags (especially now with packed refs, which means that we can have huge number of tags and this doesn't affect performance doue to I/O nor repository size) That is the alternate solution, but this would mean that merge would be recorded (unless you squash it). And for published branches (like 'next' for example) it is better solution, because rebase is in fact rewriting history. But rebase means that you had A---B---C topic / D---E---F---G master Rebasing 'topic' branch on top of master would mean that you would get A'--B'--C' topic / D---E---F---G master where A', B', C' represent the same changeset as A, B, C up to resolved conflicts. And yes, that is "bzr graft" http://spacepants.org/src/bzrgraft/ equivalent. Do I understand correctly that this is third-party contribution? I was talking about point-of-divergence (branching point, fork point) tracking, and merge-point tracking (or saving merge information). I mean API in the most common sense. For commands written in C it means "engine" (plumbing) functions and data structures which do most work, so writing new command means some command specific code and calling some functions to do the work. For commands written in shell it means having versatile plumbing commands (like for example git-rev-parse, git-rev-list, git-merge-base, git-cat-file, etc.) which can be joined together including pipes (--stdin option, --revs option to some commands), and git-sh-setup, common git shell setup code. For commands writtent in Perl it means the same, with Git.pm module instead of git-sh-setup. About new command detection: if you put program named git-<command> in directory with the rest of git commands, then you can call it as "git <command>" using git wrapper. I think. About adding new merge strategies: no autodoetection, you would have to add new merge strategu to git-merge.sh. -- Jakub Narebski Poland - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Linus Torvalds | Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.. |
| Paul Jackson | Re: cpuset-remove-sched-domain-hooks-from-cpusets |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Linus Torvalds | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [klibc] [patch] import socket defines |
