The mythology that Gandhi practiced “pacifism” is part of a larger mythology fed by the state to discourage political activism. Gandhi practiced asymmetry- his tactics were effective because they were diametrically opposed to the previous one hundred years of bombings, assassinations and violence. If the situation were flipped, with the previous one hundred years of resistance to the British composed entirely of non-violent, pacifistic actions and Gandhi appeared with a methodology of bombings, assassinations and violence, that too would have been effective in removing British colonial rule from India. How this would have played in the broader scope of international affairs at that point in history is probably best left to Speculative Fiction writers, but I could venture that Japanese interest in India would have been increased significantly.
The concept of “pacifism” is now used as a cudgel to bludgeon any talk of any political activism deemed “militant” even if said activism is no more militant than occupying an abandoned bank. To be clear, Gandhi’s pacifism worked because the “militancy” it displaced was actually militant– to compare squatting, picket lines, port blockades or marches to bombings, organized assault units and a network of assassins is ridiculous state propaganda.