git show-branch --topics and merge commits

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

 



Hello,

I'm trying to use 'git show-branch --topics' to list the commits on a
branch that are not yet in master. Normally this works fine, but after
merging master up to newbranch, it comes up blank (I would expect to
still see commits on newbranch that aren't on master). Eg, with a
history like so:

$ git log --graph --oneline
*   94968cf Merge branch 'master' into newbranch
|\
| * 223c001 more text
* | 13766bd new
|/
* ad878b4 ok

(newbranch on the left, master on the right)

I get the following output from git show-branch:

$ git show-branch --topics master newbranch
! [master] more text
 * [newbranch] Merge branch 'master' into newbranch
--
 - [newbranch] Merge branch 'master' into newbranch
+* [master] more text

I would expect to see the 'new' commit here, since it hasn't been
merged to master. The man page for git-show-branch says this should be
equivalent to 'git rev-list ^master newbranch', but when I run that I
get the expected output:

$ git rev-list ^master newbranch
94968cf2753b97481434f0813271659e08811177
13766bdc28df3841e25c43b53748e37f73fadb9f

So rev-list shows my merge commit and the 'new' commit, but
show-branch --topics doesn't show 'new'. Is this the expected
behavior? If so, what is the best way to get a list of changes on a
topic branch that periodically has had the master branch merged into
it?

Thanks,
-Mike
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]