Git/suuid/: New commits
[sunny256-utils.git] / README.md
blob4b70f58b33795a11f647562ee9fb7a2f35f4c8b0
1 README for utils.git
2 ====================
4 ![Pipeline
5 status](https://gitlab.com/oyvholm/utils/badges/master/pipeline.svg)
7 This is a collection of scripts I've had in my `~/bin/` directory since 
8 the previous century. Some of them are quite specific for my own use, 
9 but many of them have evolved into a mature state and could probably 
10 have their own repository as their own project. That will probably not 
11 happen, as most of the scripts consists of only one file.
13 The `master` branch is considered stable and will never be rebased. 
14 Every new functionality or bug fix is created on topic branches which 
15 may be rebased now and then. All tests on `master` (executed with "make 
16 test") should succeed. If any test fails, it’s considered a bug. Please 
17 report any failing tests in the issue tracker.
19 License
20 -------
22 Everything here created by Øyvind A. Holm (<sunny@sunbase.org>) is 
23 licensed under the GNU General Public License version 2 or later.
25 Download
26 --------
28 This repository can be cloned from
30 - `git@gitlab.com:oyvholm/utils.git` / 
31   <https://gitlab.com/oyvholm/utils.git> (Main repo)
32 - `git@bitbucket.org:sunny256/utils.git`
33 - `ssh://sunny256@repo.or.cz/srv/git/sunny256-utils.git`
35 The repositories are synced with 
36 [Gitspread](https://gitlab.com/oyvholm/gitspread).
38 Stable utilities
39 ----------------
41 These scripts are stable and ready for public use.
43 ### Git extensions, check out first
45 #### git-dangling
47 Scan the current repository for dangling heads (dead branches where the 
48 branch names have been deleted) or tags and create branches with the 
49 format `commit-SHA1` and `tag-SHA1`. This makes it easy to locate 
50 branches and tags that shouldn't have been deleted. No need to dig 
51 around in the reflog anymore. Needs `git-delete-banned`.
53 #### git-dbr
55 Delete remote and local branches specified on the command line, but can 
56 be used with the output from `git log --format=%d` or `%D`. A quick and 
57 easy way to clean up the branch tree with copy+paste.
59 #### git-rcmd
61 Execute commands in remote ssh repositories. For example, to make all 
62 connected ssh repos (if they have a local shell, of course) fetch all 
63 new commits from all remotes:
65     git-rcmd -c "git fetch --all --prune"
67 #### git-testadd
69 Execute a command with only the staged changes in Git applied.
71 If you have lots of unrelated uncommitted changes in the current 
72 repository and want to split up the commit, how can you easily check if 
73 the changes passes the test suite? With all the other unrelated changes 
74 it can be hard to make sure that only relevant changes becomes part of 
75 the commit, and that they don't result in regressions. This script 
76 clones the repository to the directory `.testadd.tmp` in the current 
77 directory and applies the staged chenges there (unless 
78 `-u`/`--unmodified` is specified), chdirs to the same relative directory 
79 in the clone and executes the command specified on the command line 
80 there.
82 If the command contains any options starting with `-`, add `--` in front 
83 of the command so they won't be parsed by git-testadd, or surround it 
84 with quotes.
86 ##### Examples
88     user@host:~/src/myproject/src/t $ git-testadd make test
90 The command will be executed in `~/src/myproject/src/t/.testadd.tmp/` 
91 with only the staged changes applied.
93     user@host:~/src/myproject/src/t $ git-testadd -- ./run-tests -v
95 This command contains a `-v` option. Disable option parsing of the 
96 command by prefixing it with `--`.
98     $ git-testadd "make && cd t && make 2>&1 | less || echo fail"
100 With quotes, even control operators and pipes can be used.
102 #### git-wip
104 Useful for working with topic branches. Create subbranches separated 
105 with a full stop in the branch name. It can create new subbranches, 
106 merge to parent branches or `master` with or without fast-forward and 
107 squash the whole branch to the parent branch or `master`.
109 ### Other stable Git extensions
111 #### git-allbr
113 Scan remotes for branches and recreate them in the local repository.
115 #### git-bare
117 Change the state of the current repository to/from a bare repository 
118 to/from a regular repository.
120 #### git-bs
122 Alias for `git bisect`, but allows execution from a subdirectory.
124 #### git-delete-banned
126 Delete unwanted `commit-SHA1` branches and `tag-SHA1` tags created by 
127 `git-dangling`. Some people like to keep old branches around after 
128 they've been squashed or rebased, but there are always some worthless 
129 branches around that only clutter the history. Those commits can be 
130 specified in `~/.git-dangling-banned`, and this command will delete 
131 them.
133 #### git-delete-old-branches
135 Delete obsolete Git branches locally and from all remotes. For each
136 branch, display a `git diff --stat` against all local and remote
137 branches with this name, a simplified `git log --graph`, and finally a 
138 `git log` with patch against all branches. Display this in less(1), and 
139 ask if all branches with this name should be deleted.
141 The following responses are valid:
143 - **y** - Delete all branches with this name locally and from all 
144   remotes and mark it as garbage.
145 - **n** - Don't delete the branch. If `-o`/`--once` is used later, files 
146   marked with `n` will not be checked.
147 - **d** - Mark branch as "don't know", to be perused later.
148 - **q** - Exit the program.
150 The answers can also be stored in an SQLite database to automate 
151 subsequent runs.
153 #### git-delrembr
155 Delete all remote and local branches specified on the command line.
157 #### git-ignore
159 Ignore files in Git. Automatically update `.gitignore` in the local 
160 directory (default) or add the file, directory or symlink to the 
161 `.gitignore` at the top of the repository. Directories will have a slash 
162 automatically added, and if the file/directory/symlink already exists in 
163 Git, it will be removed from the repository without touching the actual 
164 file.
166 #### git-logdiff
168 Show log differences between branches with optional patch.
170 #### git-mnff
172 Merge a topic branch without using fast-forward, always create a merge 
173 commit. This is used for collecting related changes together and makes 
174 things like `git log --oneline --graph` more readable. IMHO. After the 
175 branch is merged, it's deleted.
177 #### git-nocom
179 Filter output from `git branch` through this to remove `commit-SHA1` 
180 branches.
182 #### git-pa
184 Push to all predefined remotes with a single command.
186 #### git-restore-dirs
188 Restore empty directories from the `.emptydirs` file created by 
189 `git-store-dirs`.
191 #### git-rpull
193 Shortcut for `git rcmd -c "git pull --ff-only"`.
195 #### git-store-dirs
197 Store the names of all empty directories in a file called `.emptydirs` 
198 at the top of the repository. The names are zerobyte-separated to work 
199 with all kinds of weird characters in the directory names. Use 
200 `git-restore-dirs` to recreate the directories.
202 #### git-wait-until-clean
204 If there are any modifications or unknown files in the current 
205 repository, wait until it's been cleaned up. Useful in scripts where the 
206 following commands need a clean repository. Can also ignore unknown 
207 files or check for the existence of ignored files.
209 ### Various
211 #### ampm
213 Read text from stdin or files and convert from am/pm to 24-hour clock.
215 #### datefn
217 Insert, replace or delete UTC timestamp from filenames.
219 #### dostime
221 Cripple the file modtime by truncating odd seconds to even. To make life 
222 easier for rsync and friends if one has to interact with those kinds of 
223 "file systems".
225 #### edit-sqlite3
227 Edit an SQLite 3.x database file in your favourite text editor. The 
228 original version is backuped with the file modification time in the file 
229 name as seconds since 1970-01-01 00:00:00 UTC.
231 #### find\_8bit
233 Read text from stdin and output all lines with bytes &gt; U+007F.
235 #### find\_inv\_utf8
237 Read text from stdin and print all lines containing invalid UTF-8.
239 #### goal
241 Print timestamp when a specific goal will be reached. Specify start date 
242 with value, goal value and current value, and it will print the date and 
243 time of when the goal will be reached.
245 #### md-header
247 Create commented-out Vim fold markers (&#60;!-- \{\{\{_num_ --&#62;) 
248 with header level in Commonmark/Markdown files at the end of every 
249 header line where hash signs are used. Useful for big documents.
251 #### zeropad
253 Pad decimal or hecadecimal numbers with zeroes to get equal length.
255 #### zerosplit
257 Split contents into files based on separation bytes.
259 ## Stable, but has some limitations
261 ### sort-sqlite
263 Sort the rows in an SQLite database. A backup of the previous version is 
264 copied to a \*.bck file containing the date of the file modification 
265 time in the file name.
267 ## Not described yet
269 - git-add-missing-gpg-keys
270 - git-all-blobs
271 - git-all-repos
272 - git-allfiles
273 - git-authoract
274 - git-context-diff
275 - git-dl
276 - git-dobranch
277 - git-eb
278 - git-expand
279 - git-imerge
280 - git-lc
281 - git-listbundle
282 - git-mkrepo
283 - git-plot
284 - git-reach-commit
285 - git-scanrefs
286 - git-upstream
288 Create a graph in Gnuplot of the commit activity. Needs `ep`, 
289 `inc\_epstat` and `stpl`. And Gnuplot, of course.
291 FIXME: `ep` is in Nårwidsjn.
293 - git-realgc
294 - git-remote-hg
295 - git-repos
296 - git-savecommit
297 - git-size
298 - git-svn-myclone
299 - git-tree-size
300 - git-update-dirs
301 - git-wn
303 "git What's New". Create an ASCII representation of all commits that 
304 contain the current commit. Useful after a `git fetch` to list all new 
305 commits. Needs `git-lc`.
307 FIXME: Uses "git lg". Change that to a proper `git log` command or put 
308 the alias somewhere.
310 ### git diff drivers
312 - rdbl-garmin-gpi
313 - rdbl-gpg
314 - rdbl-gramps-backup
315 - rdbl-odt
316 - rdbl-sort\_k5
317 - rdbl-sqlite3
318 - rdbl-unzip
320 ### git-annex
322 - ga
323 - ga-au
324 - ga-findkey
325 - ga-fixnew
326 - ga-fsck-size
327 - ga-getnew
328 - ga-ignore-remote
329 - ga-key
330 - ga-other
331 - ga-sjekk
332 - ga-sumsize
333 - ga-tree
335 ### Apache logs
337 - access\_log-date
338 - access\_log-drops
339 - access\_log2epstat
340 - access\_log2tab
341 - access\_log\_ip
343 ### Other
345 - 256colors2.pl
346 - BUGS
347 - Div
348 - Git
349 - Lib
350 - Local
351 - Makefile
352 - Patch
353 - README.build-git.md
354 - README.md
355 - STDexecDTS
356 - Screen
357 - TODO
358 - Tools
359 - Utv
360 - access-myf
361 - ack
362 - act
363 - activesvn
364 - addpoints
365 - afv
366 - afv\_move
367 - afv\_rename
368 - afvctl
369 - age
370 - all-lpar
371 - allrevs
372 - annex-cmd
373 - ascii
374 - au
375 - avlytt
376 - bell
377 - bigsh
378 - bpakk
379 - bs
380 - build-git
381 - build-perl
382 - build-postgres
383 - build-vim
384 - ccc
385 - cdiff
386 - cdlabel
387 - center
388 - cfold
389 - charconv
390 - ciall
391 - cl
392 - clean\_files
393 - cmds
394 - colourtest
395 - commify
396 - commout
397 - construct\_call\_graph.py
398 - conv-old-suuid
399 - convkeyw
400 - cp1252
401 - cp865
402 - create\_cproject
403 - create\_imgindex
404 - create\_new
405 - create\_svn
406 - cryptit
407 - csv2gpx
408 - cunw
409 - cutfold
410 - cvscat
411 - cvse
412 - cvsvimdiff
413 - date2iso
414 - dbk
415 - dbllf
416 - debugprompt
417 - deep
418 - degpg
419 - detab
420 - dings\_it
421 - dings\_vimtrans
422 - dir-elems
423 - doc
424 - dprofpp.graphviz
425 - emptydirs
426 - enc-mp4
427 - encap
428 - encr
429 - ep
430 - ep-pause
431 - ep\_day
432 - eplog2date
433 - epstat
434 - extract\_mail
435 - ferdig
436 - fibonacci
437 - fileid
438 - filenamelower
439 - filesynced
440 - filmer
441 - filt
442 - filter\_ep
443 - filtrer\_access\_log
444 - findbom
445 - finddup
446 - findhex
447 - findrev
448 - firefox
449 - fix\_filenames
450 - fix\_mailman
451 - flac\_to\_ogg
452 - fldb
453 - fold-stdout
454 - fra\_linode
455 - fromdos
456 - fromhex
457 - g
458 - g0
459 - g1
460 - gammelsvn
461 - genpasswd
462 - geohashing
463 - getapr
464 - getpic
465 - getsvnfiles
466 - gfuck
467 - githubnetwork
468 - gotexp
469 - gpath
470 - gpgpakk
471 - gpsfold
472 - gpslist
473 - gpsman2gpx
474 - gpst
475 - gpst-file
476 - gpst-pic
477 - gptrans\_conv
478 - gq
479 - gqfav
480 - gqview
481 - grafkjent
482 - h2chin
483 - h2t
484 - h2u
485 - hentfilm
486 - hf
487 - hfa
488 - hhi
489 - hmsg
490 - href
491 - html2cgi
492 - html2db
493 - html2wiki
494 - htmlfold
495 - httplog
496 - hvor
497 - inc\_epstat
498 - irc-conn
499 - irssi
500 - isoname
501 - jday
502 - jsonfmt.py
503 - kar
504 - kbd
505 - keyw
506 - kl
507 - klokke
508 - konvflac
509 - l
510 - l33t
511 - lag3d
512 - lag\_gqv
513 - lag\_linker
514 - latlon
515 - line\_exec.py
516 - list-extensions
517 - list-tables
518 - list-youtube
519 - livecd-exit
520 - livecd-init
521 - ll
522 - log\_df
523 - log\_load
524 - logg
525 - logging
526 - lpar
527 - ls-broken
528 - lsreadable
529 - maileditor
530 - make\_tags
531 - makemesh
532 - manyfiles
533 - markdown
534 - mc
535 - mergesvn
536 - mime2txt
537 - mincvs\_vim
538 - mixline
539 - mixword
540 - mkFiles
541 - mkFiles\_rec
542 - mk\_local\_links
543 - mkcvsbck
544 - mkd
545 - mklist
546 - mkrepo
547 - mktar
548 - mobilstripp
549 - mountusb
550 - mp3\_to\_ogg
551 - mtube
552 - multiapt
553 - mvdirnewest
554 - myf
555 - mymkdir
556 - n95film
557 - netgraph
558 - nettradio
559 - nf
560 - ngttest
561 - nogit
562 - nosvn
563 - ns
564 - oggname
565 - old-git
566 - outl
567 - p
568 - pakk
569 - pakk\_logg
570 - pakkings
571 - pakkut
572 - perldeboff
573 - perldebon
574 - perlfold
575 - personnr
576 - pget
577 - pgsafe
578 - pine
579 - pingstat
580 - plass
581 - pmsetdate
582 - po-merge.py
583 - poiformat
584 - pols
585 - posmap
586 - prearmor
587 - pri
588 - primitiv\_prompt
589 - purgewiki
590 - push-annex-sunbase
591 - pynt
592 - q3r
593 - r
594 - radiolagring
595 - random
596 - rcs-extract
597 - remove\_perltestnumbers
598 - rensk
599 - repo
600 - repodiffer
601 - repopuller
602 - reposurgeon
603 - rm\_backup
604 - rmdup
605 - rmheadtail
606 - rmspc
607 - rmspcall
608 - rmspcbak
609 - rmspcforan
610 - rmxmlcomm
611 - rot13
612 - roundgpx
613 - run-test
614 - scrdump
615 - scrplay
616 - sea-repo
617 - sess
618 - sget
619 - shellshock
620 - sident
621 - sj
622 - sjekk\_iso
623 - sjekkhtmlindent
624 - sjekkrand
625 - sjekksommer
626 - skipline
627 - skiptoplines
628 - slekt
629 - slogg
630 - smsum
631 - snu\_epstat
632 - sommer
633 - sortcvs
634 - sortxml
635 - split\_access\_log
636 - split\_ep-logg
637 - split\_log
638 - split\_md5
639 - spreadsheet
640 - src
641 - ssht
642 - sssh
643 - statplot
644 - std
645 - storelog
646 - stpl
647 - strip-conflict
648 - strip-nonexisting
649 - strip\_english
650 - strip\_msgstr
651 - sumdup
652 - sums
653 - sunnyrights
654 - suntodofold
655 - suuid
656 - svedit
657 - svn-po
658 - svnclean
659 - svndiff
660 - svnfiledate
661 - svnlog2tab
662 - svnrevs
663 - svnsize
664 - svnstat
665 - t
666 - t2h
667 - ta\_backup
668 - tab
669 - tail-errorlog
670 - tarsize
671 - telenorsms
672 - testfail
673 - tests
674 - til-ov
675 - tmux\_local\_install.sh
676 - todos
677 - togpx
678 - tohex
679 - tojson
680 - tolower
681 - tosec
682 - towav
683 - txt2uc
684 - txtfold
685 - u
686 - u2h
687 - uc
688 - uj
689 - unichar
690 - unicode\_htmlchart
691 - unik\_df
692 - unz
693 - uoversatt
694 - upd
695 - urlstrip
696 - usedchars
697 - ustr
698 - utc
699 - v
700 - vd
701 - vekt
702 - vg
703 - vgr – Run a command through Valgrind
704 - view\_df
705 - vx
706 - vy
707 - wav\_to\_flac
708 - wav\_to\_mp3
709 - wavto16
710 - wdiff
711 - wdisk
712 - wikipedia-export
713 - wlan-list
714 - wlan0
715 - wlan1
716 - wn
717 - wpt-dupdesc
718 - wpt-line
719 - wpt-rmsym
720 - xf
721 - xml-to-lisp
722 - xml2html
723 - xmlformat
724 - xmlstrip
725 - xt
726 - yd
727 - ydd
728 - youtube-dl
729 - zero-to-lf
731 ----
733     File ID: a8487d1c-1c4f-11e5-b5a1-398b4cddfd2b
734     vim: set ts=2 sw=2 sts=2 tw=72 et fo=tcqw fenc=utf8 :
735     vim: set com=b\:#,fb\:-,fb\:*,n\:> ft=markdown :