4 ms·
I've wanted this for a while, but I will say there's some caveats. Sometimes I want to commit just as a "it's the end of the day, I want to leave, here's a code
by hardwaregeek 5y ago
I've wanted this for a while, but I will say there's some caveats. Sometimes I want to commit just as a "it's the end of the day, I want to leave, here's a code dump". I suppose you could have multiple tiers of code saving.
I've also wondered about whether you could do code analysis with time as a dimension. If you can analyze the evolution of the code and pull old implementations, what can you do? Autocomplete is a good example, as it can pull previous patterns you've used. Maybe some way to tell the programmer "hold up, you've made this mistake before, don't do it again"? I'm not sure.
- inetknght 5y ago> I want to commit just as a "it's the end of the day, I want to leave, here's a code dump" 1. git checkout -b eod-$(date -Id) 2. commit 3. leave 4. return 5. git checkout - 6. git merge - --no-commit
- hardwaregeek 5y agoYes, but if we're talking about some hypothetical tool that requires a valid AST, there might be a situation where I don't have a valid AST and want to save the code. Similarly, I had a job where we used pre-commit hooks that ran a linting script. I had to override the hook to commit which was slightly annoying at times.
- lsaferite 5y agoPerhaps you store the invalid syntax portion as an in-tree comment until it's valid syntax.