{"thread":{"id":"54238","subject":"git format-patch with useAutoBase = true","startedAt":"2020-09-15T00:14:13Z","lastAt":"2020-09-15T22:07:48Z","messageCount":2,"participants":["Jacob Keller","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"405540","messageId":"CA+P7+xpjSxEmB0qpWkhkd=yeA9xF-ssVdW1J5NyJdkqfza=GPg@mail.gmail.com","threadId":"54238","inReplyTo":null,"subject":"git format-patch with useAutoBase = true","fromName":"Jacob Keller","fromEmail":"jacob.keller@gmail.com","sentAt":"2020-09-15T00:13:29Z","receivedAt":"2020-09-15T00:14:13Z","isPatch":false,"sender":{"key":"jacob.keller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"Hi,\n\nI just ran into a surprising and unexpected issue with git format-patch.\n\n$  git format-patch -1 f7529b4ba3c98470b0e367ba447ad0da84dc308\nfatal: base commit shouldn't be in revision list\n\nIt took me about 15 minutes to figure out this was referring to the\nfact that I have \"useAutoBase\" set to true in the git config, so that\nI get --base=auto by default.\n\nIt turns out, that if you, while this config is active, try to format\nan ancient patch that is historical, you will get this failure.\nBecause --base wasn't specified on the command line, this made it very\nunintuitive what was going wrong.\n\n(I started to try a git bisect thinking it was a some bug in my\ncurrent version of git from the repo, which still failed..)\n\nThe failure occurs because the \"automatic\" base is newer than the\nrequested commit. I am wondering if it would make sense to relax this\nrestriction and make the format-patch automatically disable\nuseAutoBase if it would conflict like this?\n\nAt the very least it would be helpful if the error message was more\nintuitive and potentially explained what was going on a bit better...\n:)\n\nThanks,\nJake\n"},{"id":"405579","messageId":"xmqqzh5qzt3d.fsf@gitster.c.googlers.com","threadId":"54238","inReplyTo":"CA+P7+xpjSxEmB0qpWkhkd=yeA9xF-ssVdW1J5NyJdkqfza=GPg@mail.gmail.com","subject":"Re: git format-patch with useAutoBase = true","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-09-15T20:24:22Z","receivedAt":"2020-09-15T22:07:48Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jacob Keller <jacob.keller@gmail.com> writes:\n\n> $  git format-patch -1 f7529b4ba3c98470b0e367ba447ad0da84dc308\n> fatal: base commit shouldn't be in revision list\n> ...\n> The failure occurs because the \"automatic\" base is newer than the\n> requested commit. I am wondering if it would make sense to relax this\n> restriction and make the format-patch automatically disable\n> useAutoBase if it would conflict like this?\n\nI agree that it does make a horrible end-user experience to die with\nthe message like the above, trying to use a nonsense autobase.\n"}]}