$ gi tstatus
To fix this, I've added the following to my .bashrc: gi() {
args=("$@")
args[0]=${args[0]/t/}
git "${args[@]}"
}
It also works if you drop the "t" altogether.91–100 of 244 posts
$ gi tstatus
To fix this, I've added the following to my .bashrc: gi() {
args=("$@")
args[0]=${args[0]/t/}
git "${args[@]}"
}
It also works if you drop the "t" altogether.Earlier quoted context omitted.
In the context of software it seems like the word has pretty broadly adopted the meaning of "side-effect free". It's even made it to Wikipedia: https://en.wikipedia.org/wiki/Idempotence#Computer_science_m... One notable example: Stripe's "idempotency keys": https://stripe.com/blog/idempotency
I understand 'idempotent' not as 'having no side effects' but as 'having the same side effects whether performed one or many times'. This is side-effect free: echo hello This is side-effectful, but idempotent: echo hello >world This is side-effectful and not idempotent: echo hello >>world
About the only side effect free operation at a blank line terminal prompt is _probably_ hitting enter or ctrl c. Or ‘#something’
But your idempotency examples are spot on.
Basically, idempotency is a very useful concept. Side effect free isn’t.
Earlier quoted context omitted.
I had a senior dev interview with a major company in SV last year where the lead and hiring manager claimed that the description for this behavior was "side-effect free". I didn't want to ruin my chances by correcting him that side-effects and idempotence refer to different qualities. I passed the interview, but I've never forgotten that. The guy also seemed to have washed into the interview off his surf board. Oh we…
In the context of software it seems like the word has pretty broadly adopted the meaning of "side-effect free". It's even made it to Wikipedia: https://en.wikipedia.org/wiki/Idempotence#Computer_science_m... One notable example: Stripe's "idempotency keys": https://stripe.com/blog/idempotency
Earlier quoted context omitted.
I understand 'idempotent' not as 'having no side effects' but as 'having the same side effects whether performed one or many times'. This is side-effect free: echo hello This is side-effectful, but idempotent: echo hello >world This is side-effectful and not idempotent: echo hello >>world
Interestingly, in this case the non-idempotent option is less safe.
(I suspect you meant “safe” in a different sense, but I couldn't resist.)
>I quite often type git then go away and come back, then type a full git status after it. Does anyone else actually do this besides OP. I've never heard of this problem until now.
I do. And I also write "vim vim thefile.txt" and stuff like that. Finally I've written a small shell function that corrects "gi tpull" to "git pull", because that happens at least once a day.
Earlier quoted context omitted.
The one I do is `git clone ` then paste in the repository URL from bitbucket, and end up with `git clone git clone https://....` I don't think that can be solved here though.
Hah! Bitbucket drives me nuts in many ways but this one truly is the worst!
Earlier quoted context omitted.
I understand 'idempotent' not as 'having no side effects' but as 'having the same side effects whether performed one or many times'. This is side-effect free: echo hello This is side-effectful, but idempotent: echo hello >world This is side-effectful and not idempotent: echo hello >>world
I disagree that your ‘ echo hello’ example is free of side effects. It writes to stdout. It overwrites $?. It changes the value of the last executed history command. Etc. About the only side effect free operation at a blank line terminal prompt is _probably_ hitting enter or ctrl c. Or ‘#something ’ But your idempotency examples are spot on. Basically, idempotency is a very useful concept. Side effect free isn’t.
I posit that you understand perfectly well what i was getting at! If it helps, imagine that you are spawning a fresh shell to execute each command line, through system(3) or some such.