[BUG] Branches before "git subtree add --squash" are pushed via "git subtree push"

2019-07-15 Thread Danny Lin
Say we have a repository with "master" and "sub" branches like below: A---B---C---D---E---F master / X---Y X---Y sub where commits A and B include changes in subdirectory "sub", commit C removes subdirectory "sub", commit D is generated by "git subtree add -P s

UTF-8-safe way for char-level-diff

2018-01-19 Thread Danny Lin
Git has a diff.wordRegex config that allows the user to specify a regex that defines a word. Setting diff.wordRegex to "." works well for a char-level diff for ASCII chars, but not for UTF-8 chars. For example, if a file (encoded by UTF-8) with text "一人" is changed to "丁人", "git diff --word-diff=c

Re: [PATCH] contrib/subtree: fix linefeeds trimming for cmd_split()

2015-05-06 Thread Danny Lin
7; or 'git checkout' Maybe using printf is the way to go? 2015-05-06 3:11 GMT+08:00 Junio C Hamano : > Danny Lin writes: > >>> I think this was written knowing that "say" is merely a thin wrapper >>> of "echo" (which is a bad manner but happen