Hi Chris,

On Tuesday, August 8, 2017 at 4:02:43 AM UTC+2, Chris Murphy wrote:
>
> Oh man, sorry, I totally screwed up when editing the output to exclude 
> tags, making the graph totally wrong since some lines were missing. Sorry 
> about that.
>
> I've fixed that issue (Sorry, I still have to edit out tags. I'm 
> using grep -o ".*[0-9a-f]\{10\}\|.* $", and open to any better suggestions)
>
>
> Here's command 1
> git log --tags=1 --format=%h\%d --graph --sparse --full-history branchA 
> branchB ^03dd551f031f48e8702f9154b23f53af8cc4799b^ | grep -o 
> ".*[0-9a-f]\{10\}\|.* $"
> https://gist.github.com/cmurphycode/84d7efae872a4f23dfb01efdad4836e7
>
> command 2
> git log --format=%h\%d --graph --sparse --full-history branchA branchB 
> ^9ba8f06829b2d2170f23254ed3fe8f3727fe56dc^ | grep -o ".*[0-9a-f]\{10\}\|.* 
> $"
> https://gist.github.com/cmurphycode/0498a5530e68382d32f1833dfd669311
>

That looks much better, but I`m not sure if it can/should still be trusted, 
either, as "--tags=1" parameter you added can cause (pretty much?) all 
history to still be included, missing the point of last ^{commit}^ 
restriction, and might be grepping could still omit some lines...?

If you would prefer not showing tags, maybe the easiest approach would be 
omitting "decorations" placeholder "%d" inside "--format" parameter 
altogether:

(*1*) $ git log --format=%h --graph --sparse --full-history branchA branchB 
^03dd551f031f48e8702f9154b23f53af8cc4799b^

... and:

(*2*) $ git log --format=%h --graph --sparse --full-history branchA branchB 
^9ba8f06829b2d2170f23254ed3fe8f3727fe56dc^

This should produce desired graph history with only commit sha1`s shown, no 
need to grep anything out.

We already know the commits branches A and B point to from your previous 
examples, so missing these should not be a problem -- unless your history 
changed further, in which case you could write these to the right of 
corresponding commits by hand (paying attention not to break the graph 
layout - in case you`re not sure, better just leave it as it is).

Regards,
Buga

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to