On 4/22/16, Steve Schow <st...@bstage.com> wrote:
>
>  Im not sure if you’re saying a merge here would
> merge multiple commits from one branch into a single commit on the dest
> branch?  You said it preserves the history, but that would infer that the
> merge would not squash the commits in the process.
>

Here is an simple example:

   https://www.sqlite.org/src/timeline?c=2016-04-13&nd

Ignore the tempfiles-25 and tempfiles-lazy-open branches - those are
concurrent activities that do not play into this discussion.  I'm
looking at the "warning" branch with three check-ins by Joe (userid:
mistachkin) starting on 2016-04-12 20:05.

Joe did three check-ins to fix compiler warnings.  [ab69527c],
[7faec9ea], and [929fa4c3].  He then asked me (userid: drh) to look
them over and merge them if he thought they were appropriate, which I
did at [68142dc5].  Do you see the branch I'm talking about?

Notice that after Joe made his changes, but before they were merged, I
checked in another unrelated change directly to trunk at [83cfe82c].

You can see a "squash" of Joe's three commits in several ways:

(1) Click on the circular graph node for the baseline of Joe's
changes, which is [bedb88a4].  You'll notice that the center of the
circle turns red.  Then click on the circle for the last of Joe's
check-ins [929fa4c3].  You will then see a diff which is the aggregate
of Joe's three check-ins.  It is showing you an aggregate diff from
the baseline (the circle with the red dot in the middle) to the second
node you clicked on, which is same thing as the "squashed" check-in.

Hint:  Click on the circle with the red dot again to turn the red dot off.

(2) Click on the "[68142dc5]" hyperlink to the merge check-in and look
at its diff.  That check-in merged all changes in the "warnings"
branch into trunk, so it should show mostly the same diff as (1).
(Any variance is because (1) is using [bedb88a4] as its baseline where
as (2) is using [83cfe82c].  In this case, as in the vast majority of
cases, the changes from [bedb88] to [83cfe8] are be well separated
from the changes in the "warnings" branch and hence the diffs will be
identical.)

(3) You can also do this from the command-line by typing:  "fossil
diff --from bedb88 --to 929fa4 --tk" or something similar.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to