Solved

git dependencies

Posted on 2013-01-08
7
407 Views
Last Modified: 2013-01-22
In my attempts to make a revision number work with a library of dependencies in my code, I would rather keep a repository of dependencies that my projects link to- so that I get the following:

1- one place to put dependencies
2- all branches link to one current version of dependency.

But now I'd like to have some automatic way to know what dependency was used (like what version of boost was linked to, without copying all the dlls into each branch).

I hope I'm being clear enough.  Any ideas on how to do this automatically, correctly and easily?

Thanks!
Mike
0
Comment
Question by:thready
  • 4
  • 3
7 Comments
 
LVL 1

Author Comment

by:thready
ID: 38756332
i shouldn't say revision number- but node id checksum that git uses...
0
 
LVL 40

Expert Comment

by:evilrix
ID: 38756439
You might want to look at git sub-modules, which allows to you include one project into another. The sub-module is pinned to a specific revision until such time that you update it via the parent, even if the original project of the sub-module has had additional changes.

http://git-scm.com/book/en/Git-Tools-Submodules

I don't know of any other way that git can assist you with revision management.
0
 
LVL 1

Accepted Solution

by:
thready earned 0 total points
ID: 38787436
I found a solution- I realized that if I create a new separate repository, it could always just have a single branch and contain all my external dependencies.  Then, because of the strings in project settings belonging to my code, they "point" and change the git id sufficiently for me to know exactly which versions of external libs were used in all my projects...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 40

Expert Comment

by:evilrix
ID: 38787531
Hey, thready. If that works for you then that's great, but did you check out sub-modules? I suspect you'll find that solves your problem in a more elegant (and possible safer) way.

Let me know if you'd like more info.
0
 
LVL 1

Author Comment

by:thready
ID: 38787549
I did read it quickly but thought it wasn't exactly what I was looking for.  Knowing you and your great input, I'd like to ask the moderators to hold off on accepting my own solution so I can look again at sub-modules.  Very busy though- I might need till Monday!  :)

Cheers evilrix!
0
 
LVL 40

Expert Comment

by:evilrix
ID: 38787627
Don't worry about holding off the closure, we can always change that later if need be. More important, I just wanted to make sure I'd been clear in my suggestion. It may very well be that it won't solve the problem you have but I just wanted to make sure you'd not over looked it :)

Thanks for getting back to me.
0
 
LVL 1

Author Closing Comment

by:thready
ID: 38804765
The reason is explained with my last comment.  Not sure why we need to say it twice when accepting our own answer...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Find Visual Studio Tools 2 92
Team Foundation Server 8 61
Using Diagnostic tools in VS2015: Unresoved allocations 19 66
trigs fail! I thought I knew how to do trignometry 3 56
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now