Re: couple questions about git "logical variables" and "git var"

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 07:35:30PM -0700, Jonathan Nieder wrote: > > It also only tells half the story. You have to know not just what's in > > $GIT_EDITOR, but you have to know the right way to evaluate it. There's > > a git_editor helper in git-sh-setup, but other scripting languages are > > on

Re: couple questions about git "logical variables" and "git var"

2017-10-05 Thread Jonathan Nieder
Jeff King wrote: > On Thu, Oct 05, 2017 at 05:11:04AM -0400, rpj...@crashcourse.ca wrote: >> - GIT_AUTHOR_IDENT >> - GIT_COMMITTER_IDENT >> - GIT_EDITOR >> - GIT_PAGER >> >> first question -- what is it about precisely those four variables that makes >> them "logical" variables in git parlance

Re: couple questions about git "logical variables" and "git var"

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 05:11:04AM -0400, rpj...@crashcourse.ca wrote: > i just ran across "git var" for the first time, and it seems a bit weird. > it refers to the (apparently) four git "logical variables": It's definitely weird. > - GIT_AUTHOR_IDENT > - GIT_COMMITTER_IDENT > - GIT_EDITOR

couple questions about git "logical variables" and "git var"

2017-10-05 Thread rpjday
i just ran across "git var" for the first time, and it seems a bit weird. it refers to the (apparently) four git "logical variables": - GIT_AUTHOR_IDENT - GIT_COMMITTER_IDENT - GIT_EDITOR - GIT_PAGER first question -- what is it about precisely those four variables that makes them "logical

Re: Questions about GIT

2015-12-14 Thread Stefan Beller
On Mon, Dec 14, 2015 at 2:48 AM, Jack McLear wrote: > Hi > > I’ve recently been made aware of GIT and had a few questions. > I’m currently working on creating a middleware between FORAN (a CAD system) > and Teamcenter. > > Do you know if GIT would work between the two? Git is designed to track a

Questions about GIT

2015-12-14 Thread Jack McLear
Hi I’ve recently been made aware of GIT and had a few questions. I’m currently working on creating a middleware between FORAN (a CAD system) and Teamcenter. Do you know if GIT would work between the two? We’re currently using a Centralised version control system. So to check my understanding,

Re: Questions about git-push for huge repositories

2015-09-08 Thread Jeff King
On Tue, Sep 08, 2015 at 11:24:06AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > If you turn on reachability bitmaps, git _will_ do the thorough set > > difference, because it becomes much cheaper to do so. E.g., try: > > > > git repack -adb > > > > in repo A to build a single pack

Re: Questions about git-push for huge repositories

2015-09-08 Thread Junio C Hamano
Jeff King writes: > If you turn on reachability bitmaps, git _will_ do the thorough set > difference, because it becomes much cheaper to do so. E.g., try: > > git repack -adb > > in repo A to build a single pack with bitmaps enabled. Then a subsequent > push should send only a single object (

Re: Questions about git-push for huge repositories

2015-09-07 Thread Jeff King
On Tue, Sep 08, 2015 at 09:30:09AM +0800, Levin Du wrote: > Take kernel source code for example: > > # Clone the kernel to A and B > $ git --version > git version 2.3.2 > $ git clone --bare ../kernel/ A > $ git clone --bare ../kernel/ B OK, two repos with the same source. > # Create the orpha

Re: Questions about git-push for huge repositories

2015-09-07 Thread Jeff King
On Mon, Sep 07, 2015 at 09:05:41AM +0800, Levin Du wrote: > > Instead, the object transfer is optimized by comparing what commits > > each side has and sending trees and blobs that are reachable from > > the commits that the receiving side does not have. > > The sender A sends all the commits tha

Re: Questions about git-push for huge repositories

2015-09-07 Thread Levin Du
I consider 'git push' need further optimization. Take kernel source code for example: # Clone the kernel to A and B $ git --version git version 2.3.2 $ git clone --bare ../kernel/ A $ git clone --bare ../kernel/ B # Create the orphan commit and check $ cd A $ git branch test Switched to a new

Re: Questions about git-push for huge repositories

2015-09-06 Thread Levin Du
I try to use 'git replace --graft' to work aroud this. Here's the process: cd A fetch ../B master:master_b git replace --graft master_b master_a # now master_b's parent is master_a # do a filter-branch to make the stone solid git filter-branch --tag-name-filter cat -- master_a..master_

Re: Questions about git-push for huge repositories

2015-09-06 Thread Levin Du
> Instead, the object transfer is optimized by comparing what commits > each side has and sending trees and blobs that are reachable from > the commits that the receiving side does not have. The sender A sends all the commits that the receiver B does not have. The commits contains trees and blobs.

Re: Questions about git-push for huge repositories

2015-09-06 Thread Junio C Hamano
Levin Du writes: > Since A & B share many common files, to save disk space, I'd like to merge > them: > (note: branch of A & B are independent, i.e. have no common ancestor.) Not having any shared history is exactly the cause. If the optimization were to exchange list of all the commits, blobs

Questions about git-push for huge repositories

2015-09-06 Thread Levin Du
Hi all, I meet with a strange problem: I've two repositories, with sizes: - A: 6.1G - B: 6G Both A & B have been 'git gc' with: git reflog expire --expire=now --all git gc --prune=now --aggressive Since A & B share many common files, to save disk space, I'd like to merge them: (note: