At Appomattox, holding a red handkerchief aloft, General Custer rode up to General Longstreet and rashly demanded the surrender of the Army of Northern Virginia. Longstreet refused stating that talks were being conducted between Lee and Grant and that they, as subordinates, would have to wait. Custer insists at which point an angered Longstreet orders his officers to prepare for battle. Crestfallen, Custer rides away. Check out Longstreet's memoirs (From Manassas to Appomattox) if you want to read more about it. However, I found this tidbit from another source.

"From the left we saw a Federal officer riding at full gallop into our lines, waving before him a red bandanna handkerchief. When he came near enough to be heard, he inquired who was in command, and some one said: 'General Gordon.' He then went on, waving his handkerchief, until he met the General and had some conversation with him in connection with the surrender. When he galloped by us and in easy range, a brave soldier of the 31st Georgia Regiment, whose face was set with tears, threw his gun up and said: 'I'll get that scoundrel.' But some one who was more thoughtful knocked his gun up and said: 'Don't, John; it may be that the surrender has already taken place, and it may cause trouble.' Thursby replied: 'That's not a white flag, and I am not bound to respect it.' But his comrades would not allow him to shoot, and Custer, the bloody tyrant (shall I use the word?), who had shed so much innocent blood that devastated the Valley of Virginia with the torch, rode on, not knowing how near he came to the expiation of his heartly cruelty, only to meet a fate later on which he richly deserved if the command, 'Thou shalt not kill,' means anything."