2,833 questions
Advice
0
votes
0
replies
17
views
How modify script with adding second task?
This script adds a line to add custom.js to vivaldi browser directory:
#!/bin/bash
vivaldi=/opt/vivaldi/resources/vivaldi
moddir=$HOME/vivaldi-modding/
sudo cp $moddir/custom.js $vivaldi
sudo sed -i -...
1765
votes
13
answers
1.2m
views
How can I generate a Git patch for a specific commit?
I want to create a patch for a specific commit hash, <rev>.
I tried using git format-patch <rev>, but that generated a patch for each commit since the <rev> commit. Is there a way to ...
0
votes
0
answers
29
views
buildroot foces adding hash file in BR2_GLOBAL_PATCH_DIR?
I'm using buildroot 2024.02.
I set BR2_GLOBAL_PATCH_DIR+="$(BR2_EXTERNAL_MY_PATH)/patches". Its contents:
% tree /home/admin/buildroot-external-my/patches
/home/admin/buildroot-external-my/...
570
votes
15
answers
564k
views
git apply fails with "patch does not apply" error
I have a certain patch called my_pcc_branch.patch.
When I try to apply it, I get following message:
$ git apply --check my_pcc_branch.patch
warning: src/main/java/.../AbstractedPanel.java has type ...
319
votes
8
answers
375k
views
Create patch or diff file from git repository and apply it to another different git repository
I work on WordPress based project and I want to patch my project at each new release version of WP. For this, I want generate a patch between two commits or tags.
For example, in my repo /www/WP I do ...
2
votes
2
answers
59
views
How to change legend patches after plotting?
I have a function that is supposed to enlarge all labels in a figure to make it ready for export. However I fail to enlarge the legend properly:
import matplotlib.pyplot as plt
def enlarge_legend(ax, ...
453
votes
7
answers
597k
views
How to apply a patch generated with git format-patch?
I have two local git repositories, both pointing to the same remote repository.
In one git repository, if I do git format-patch 1, how can I apply that patch to the other repository?
275
votes
10
answers
193k
views
What is the main difference between PATCH and PUT request?
I am using a PUT request in my Rails application. Now, a new HTTP verb, PATCH has been implemented by browsers. So, I want to know what the main difference between PATCH and PUT requests are, and when ...
169
votes
8
answers
44k
views
How can I visualize per-character differences in a unified diff file?
Say I get a patch created with git format-patch. The file is basically a unified diff with some metadata. If I open the file in Vim, I can see which lines have been modified, but I cannot see which ...
107
votes
6
answers
200k
views
Mocking a global variable
I've been trying to implement some unit tests for a module. An example module named alphabet.py is as follows:
import database
def length_letters():
return len(letters)
def contains_letter(...
447
votes
5
answers
266k
views
How to move certain commits to be based on another branch in git?
The situation:
master is at X
quickfix1 is at X + 2 commits
Such that:
o-o-X (master HEAD)
\
q1a--q1b (quickfix1 HEAD)
Then I started working on quickfix2, but by accident took quickfix1 ...
90
votes
8
answers
86k
views
git: generate a single patch across multiple commits
This is the situation:
We created a "private" repo (say our-repo) based off an existing open-source git repo (say source-repo).
We have been developing code and have around 20 merges into our repo. So,...
0
votes
1
answer
1k
views
Power Apps Patch() not working correctly in all instances
I have a very complex logic statement that uses multiple settings to determine if to perform a Patch() function.
I use Notify() to isolate which statement is firing.
I have isolated it to Statement#4 ...
17
votes
3
answers
32k
views
What is the proper way to "patch" a node_modules module?
Say I have a Node.js app, lets call it patched-app. This app is a simple app that uses prompt-sync to ask for user input and then does something with it.
So we create a folder patched-app and ...
245
votes
6
answers
257k
views
How do I simply create a patch from my latest git commit?
I am looking for the command for creating a patch from the last commit made.
My workflow sometimes looks like this:
vi some.txt
git add some.txt
git commit -m "some change"
Now I just want ...