tig

Take sha number of commit by tig

女生的网名这么多〃 提交于 2021-02-07 19:53:20
问题 I love to use tig client to navigate through git commits. But I'm missing one thing for now. Is there a key binding to take a sha number of a git commit I'm currently staying at? 回答1: Check if the command proposed in jonas/tig issue 557 would work for you: bind generic 9 !sh -c "echo -n %(commit) | xclip -selection c && echo Copied %(commit) to clipboard" That would copy the current commit SHA1 in your clipboard. In the Wiki binding page, you also have example for Mac or Cygwin: bind generic

Take sha number of commit by tig

廉价感情. 提交于 2021-02-07 19:48:27
问题 I love to use tig client to navigate through git commits. But I'm missing one thing for now. Is there a key binding to take a sha number of a git commit I'm currently staying at? 回答1: Check if the command proposed in jonas/tig issue 557 would work for you: bind generic 9 !sh -c "echo -n %(commit) | xclip -selection c && echo Copied %(commit) to clipboard" That would copy the current commit SHA1 in your clipboard. In the Wiki binding page, you also have example for Mac or Cygwin: bind generic

oracle 触发器

扶醉桌前 提交于 2021-01-05 01:43:56
触发器的定义就是说某个条件成立的时候,触发器里面所定义的语句就会被自动的执行。因此触发器不需要人为的去调用,也不能调用。然后,触发器的触发条件其实在你定义的时候就已经设定好了。这里面需要说明一下,触发器可以分为语句级触发器和行级触发器。详细的介绍可以参考网上的资料,简单的说就是语句级的触发器可以在某些语句执行前或执行后被触发。而行级触发器则是在定义的了触发的表中的行数据改变时就会被触发一次。 具体举例: 1、 在一个表中定义的语句级的触发器,当这个表被删除时,程序就会自动执行触发器里面定义的操作过程。这个就是删除表的操作就是触发器执行的条件了。 2、 在一个表中定义了行级的触发器,那当这个表中一行数据发生变化的时候,比如删除了一行记录,那触发器也会被自动执行了 。 触发器语法 触发器的语法: create [or replace] tigger 触发器名 触发时间 触发事件 on 表名 [for each row] begin pl/sql语句 end 其中: 触发器名 :触发器对象的名称。由于触发器是数据库自动执行的,因此该名称只是一个名称,没有实质的用途。 触发时 间:指明触发器何时执行,该值可取 : befo re:表示在数据库动作之前触发器执 行; af ter:表示在数据库动作之后触发器 执行。 触发事件:指明哪些数据库动作会触发此 触发器: i nsert

crash工具分析大型Linux服务器死锁实战

淺唱寂寞╮ 提交于 2021-01-04 13:06:00
Linux服务器背景: CPUS: 40 MEMORY: 127.6 GB MACHINE: x86_64 (2199 Mhz) Linux Kernel: 4.4.121 TASKS: 19411 其实这不算大型服务器,我见过大型的一般内存4T起步,300多个cpu. 故障背景: 客户发现系统卡死,手动触发了kdump. 使用下面命令发现有3092个D状态进程。 crash> ps | grep UN | wc -l 3092 小编头一回碰到这么多进程变成D状态,第一感觉应该就是死锁导致。 于是: crash> ps | grep UN > UN (导入UN文件慢慢玩) 发现UN里面有大量的ps、sudo这样的进程。 于是挑了一个ps进程查看它的堆栈: crash > bt 50486 PID : 50486 TASK : ffff881171480c80 CPU : 18 COMMAND : " ps " #0 [ffff8810d1d9bce0] schedule at ffffffff815f353d #1 [ffff8810d1d9bd40] rwsem_down_read_failed at ffffffff815f61ea #2 [ffff8810d1d9bd98] call_rwsem_down_read_failed at ffffffff813271d4 #3

git completion in zsh: __git_func_wrap:3: : not found

风格不统一 提交于 2020-12-30 07:45:53
问题 git-completion.zsh and git-completion.bash are installed automatically when running brew install git : ❯ ls -l /usr/local/share/zsh/site-functions/_git lrwxr-xr-x 56 quanta 7 Jul 18:54 /usr/local/share/zsh/site-functions/_git -> ../../../Cellar/git/2.27.0/share/zsh/site-functions/_git ❯ ls -l /usr/local/share/zsh/site-functions/git-completion.bash lrwxr-xr-x 71 quanta 7 Jul 18:54 /usr/local/share/zsh/site-functions/git-completion.bash -> ../../../Cellar/git/2.27.0/share/zsh/site-functions/git

SqlServer Update触发器判断某个字段的值是否已经更改

若如初见. 提交于 2020-01-08 15:31:38
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 要求:修改主表中某个字段的值,自动更新子表中的某个字段 我们为了不更改程序,创建一个update触发器。 create trigger [tig_update] on 表名 after update as declare @id int begin if (update(主表列名)) begin select @id=id from inserted update 子表名 set lasttime = GETDATE() where pid = @id end end 效果好像不对, 单用if update(a), 也体现不出效果, 为什么? 如果我们执行 update 主表 set 列名a=原来的值 where id = id 发现也触发这个事件,这是不对的,只有列名a的值发生了改变,我们才能修改子表的数据啊: 我们改为以下的触发器,效果就出来了 create trigger [tig_update] on 表名 after update as declare @id int, @upflag int begin select @upflag = case when a.列名=b.列名 then 0 else 1 end, @id=a.id from deleted a left join inserted

How do I use tig to view the diff for a file which is changed but not commited?

我是研究僧i 提交于 2019-12-23 17:09:23
问题 In git, it is git diff <file path> , but what about in tig? In tig, in the status view, highlighting a file (staged or unstaged) and pressing D , diffs the last commit. I think it should diff the uncommitted file against the last committed version of that file. 回答1: As a hack, you can do git diff <file path> | tig and see it. On the status section in tig you can see both the staged and unstaged changes (say, git diff vs git diff --cached ) pressing Enter over the file in each of the sections

How do I undo maximize in tig?

荒凉一梦 提交于 2019-12-23 14:45:35
问题 In tig, I start in the main view, and when I hit Enter on a commit, I get a split-screen with the diff view. I'm scrolling through the diff view, and then I accidentally type O . Now the diff view is maximized. I did not want this, and want to go back to what I was looking at before. How do I un-maximize it so I have my original split screen again? 回答1: There is no un-maximize action provided by Tig. You have to close the diff view (e.g. with q ) to go back to the main view and then hit Enter

Get commit where merged branch forked from (with intermediate merge)

旧巷老猫 提交于 2019-12-06 12:34:43
问题 Lets use the latest available git 2.16.2 and tig 2.3.3. cd /tmp && mkdir fit && cd fit git init touch m1 && git add m1 && git commit -m "master 1" touch m2 && git add m2 && git commit -m "master 2" git checkout -b develop touch d1 && git add d1 && git commit -m "develop 1" git checkout master touch m3 && git add m3 && git commit -m "master 3" git checkout develop git merge master --no-edit touch d2 && git add d2 && git commit -m "develop 2" touch d3 && git add d3 && git commit -m "develop 3"

Get commit where merged branch forked from (with intermediate merge)

蓝咒 提交于 2019-12-04 18:43:54
Lets use the latest available git 2.16.2 and tig 2.3.3. cd /tmp && mkdir fit && cd fit git init touch m1 && git add m1 && git commit -m "master 1" touch m2 && git add m2 && git commit -m "master 2" git checkout -b develop touch d1 && git add d1 && git commit -m "develop 1" git checkout master touch m3 && git add m3 && git commit -m "master 3" git checkout develop git merge master --no-edit touch d2 && git add d2 && git commit -m "develop 2" touch d3 && git add d3 && git commit -m "develop 3" git checkout master git merge develop --no-edit touch m4 && git add m4 && git commit -m "master 4" git