emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fixing an Elpa package


From: Stefan Monnier
Subject: Re: fixing an Elpa package
Date: Mon, 20 Apr 2015 08:34:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Okay, thanks for this. Just so I'm very clear: the above command uses
> --squash so that Git would pay attention to the metadata in your dummy
> commit, but I should not be using --squash from here on out, is that
> correct?

I'm not sure, to tell you the truth.  I never use --squash, so I'm not
very familiar with it.  But with the current tree, I see that

   git subtree merge --squash -P packages/gnorb gnorb/master

gives me relatively few conflicts, whereas

   git subtree merge -P packages/gnorb gnorb/master

gives me a load of conflicts, so it seems that if you don't provide the
"--squash" argument, Git assumes that you haven't used "--squash" in the
past either and doesn't look for the commit messages that "--squash"
uses to try and find the common ancestor.

IOW, if you've used --squash in the past, it's best to keep doing so.

You can switch to the non-squash option, of course, if you want.
Basically, you can do a

   git subtree merge -P packages/gnorb 321b23b1ad1b770e2b2bd27921f069b9394ca4d0
   git diff | patch -R -p1
   git commit -am 'Dummy merge to convert to non-squash subtree'

where 321b23b1ad1b770e2b2bd27921f069b9394ca4d0 is the revision
up-to-which the branch has already been (squash-)merged.

> I ran the command you listed above, resolved the conflicts, and
> committed. That gave me one squashed commit containing all the new
> commits from my external repo, and another merge commit (this second
> commit was huge, and looked like most of the code from the package).

Sounds right.

> The external and Elpa trees were not in sync, though -- "diff -r" gave
> me some differences.

These should only be differences due to the commits I installed directly
into elpa.git, which you maybe haven't merged in the same way into your tree?
[ Just guessing here.  ]


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]