git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git filter-branch and superproject
@ 2008-12-16 11:56 Sergio Callegari
  2008-12-16 13:01 ` Boaz Harrosh
  0 siblings, 1 reply; 2+ messages in thread
From: Sergio Callegari @ 2008-12-16 11:56 UTC (permalink / raw)
  To: git

Hi,

once a sub-project has been rewritten by filter branch, there is a problem with
references in superproject.

This is obviously a case where something "has been published" so filter-branch
is not a good idea.  However, super-projects are a very special case of
publication since they might be "in full control" of whom did the rewriting of
their submodules.

Is there a way to filter branch the superproject so that whatever commit is
referenced that is in refs/original/something in the subproject gets updated to
the corresponding rewritten commit (or an error is given if such a
correspondance does not exist)?

Namely, can filter-branch on the subproject deliver a "commit conversion table"
that can then be fed to a filter-branch in a superproject?  

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git filter-branch and superproject
  2008-12-16 11:56 git filter-branch and superproject Sergio Callegari
@ 2008-12-16 13:01 ` Boaz Harrosh
  0 siblings, 0 replies; 2+ messages in thread
From: Boaz Harrosh @ 2008-12-16 13:01 UTC (permalink / raw)
  To: Sergio Callegari; +Cc: git

Sergio Callegari wrote:
> Hi,
> 
> once a sub-project has been rewritten by filter branch, there is a problem with
> references in superproject.
> 
> This is obviously a case where something "has been published" so filter-branch
> is not a good idea.  However, super-projects are a very special case of
> publication since they might be "in full control" of whom did the rewriting of
> their submodules.
> 
> Is there a way to filter branch the superproject so that whatever commit is
> referenced that is in refs/original/something in the subproject gets updated to
> the corresponding rewritten commit (or an error is given if such a
> correspondance does not exist)?
> 
> Namely, can filter-branch on the subproject deliver a "commit conversion table"
> that can then be fed to a filter-branch in a superproject?  
> 
> --
> 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
> 

If I recall correctly, submodule was recently enabled to reference
a soft label, like a branch name, instead of an hard UID. Look it up
in the newest git.

But your post brings up another concern. The HEAD referenced by the
superproject does not have any hold in the subproject. So if the
subproject under-gone a git-gc the reference UID might disappear, as
in your case. I wish the git-submodule command would create a TAG or BRANCH
in the subproject of all referenced HEADs, so they will not disappear
in future maintenance of the subproject tree. (And it could be very
informative when viewing in gitweb). The subproject TAG name could, for
example, be the commit and date of the superproject's submodule commit.

Boaz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-16 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-16 11:56 git filter-branch and superproject Sergio Callegari
2008-12-16 13:01 ` Boaz Harrosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).