The croissant's name says nothing about butter or pastry. It is simply the French word for "crescent," and underneath that it means "growing."
Etymonline traces French croissant and English crescent to the same Latin verb, crescere, "to grow." The Latin phrase luna crescens meant the growing, waxing moon. Only later did "crescent" come to describe the moon's curved shape, and then anything shaped like it.
The famous story is about war. In 1683 an Ottoman army besieged Vienna. In the legend, a baker working at night heard the Turks tunnelling and raised the alarm. After the victory, bakers shaped rolls like the crescent on the Ottoman flag so the Viennese could eat their enemy.
The evidence does not support it. Austria's crescent-shaped roll, the kipferl or kipfel, is far older than the siege. Smithsonian magazine cites a poem that mentions kipfel as a Christmas treat presented to Duke Leopold in 1227. Wikipedia says no contemporary source tells any of these stories. It credits their spread to Alfred Gottschalk. In the first Larousse Gastronomique, in 1938, he set the tale during a Turkish attack on Budapest in 1686. He switched to the 1683 siege of Vienna in a book of 1948.
The real link between Vienna and Paris is much later. In 1838 or 1839, August Zang, an Austrian artillery officer, opened a Viennese bakery, the Boulangerie Viennoise, at 92 rue de Richelieu in Paris. Smithsonian says he used a patented steam oven and promoted his bakery with newspaper advertising. Paris bakers soon made their own versions of his Viennese breads.
The food historian Jim Chevallier sums up the result neatly. The croissant, he argues, began as the Austrian kipfel but "became French the moment people began to make it with puffed pastry." He also found no evidence for another legend, that Marie Antoinette brought the pastry to France.
The flaky, layered croissant took decades to arrive. Wikipedia notes "croissant" among fancy breads in 1853, and the earliest verified recipe for the modern version dates to 1905 or 1906. English had borrowed the word by 1872, according to Etymonline, first in a French setting.
So the crescent shape is Austrian and the name is French. The story about eating the Ottoman flag has no early source and spread in the 20th century.