I started with Vin<0 and assumed the 4 possible combinations of D1 and D2. For Vin<0, either D1 and D2 can be on or D1 is off and D2 is on. The book shows D1 off and D2 on as the correct answer, and I am not sure how it chose this to be the correct combination when the other one works just as well.
Note that the bottom diode is D2, and one has to assume constant voltage model (VD-on=0.8V).