-
-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run git-hooks more correctly #2483
Open
Joshix-1
wants to merge
63
commits into
gitui-org:master
Choose a base branch
from
Joshix-1:git-hooks-shell-fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 49 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
2d90eb5
use /bin/sh for git-hooks
Joshix-1 6a4b9d6
update CHANGELOG.md
Joshix-1 8571406
fix escape bugs in hooks
Joshix-1 cba5142
simplify logic for running hooks on non-windows platforms
Joshix-1 7f70d52
invert if check
Joshix-1 bd61ad8
debug_assert
Joshix-1 c257d02
update CHANGELOG.md
Joshix-1 cde4bc1
Merge remote-tracking branch 'extrawurst/master' into git-hooks-shell…
Joshix-1 816e175
simplify build_shell_script_execution_command
Joshix-1 da71107
create build_shell_script_execution_command
Joshix-1 2b6d295
small refactorings
Joshix-1 ce9fc0e
add line
Joshix-1 04a31eb
execute hoooks directly and fallback to using sh
Joshix-1 8ba997d
rename function
Joshix-1 4f65b81
update commend
Joshix-1 58afb49
sh_command
Joshix-1 a6e71d3
refactor
Joshix-1 b79e5ce
name const
Joshix-1 177d9d8
update CHANGELOG
Joshix-1 e5e562e
add new test
Joshix-1 f397799
deindent
Joshix-1 dbd8fee
fix is_executable
Joshix-1 7c8b6bc
debug print
Joshix-1 1370a14
handle ENOEXEC
Joshix-1 65c5997
add debug print
Joshix-1 102e7fd
remove debug print
Joshix-1 26b8871
set different env var
Joshix-1 5327f4a
Revert "set different env var"
Joshix-1 11da04a
remove ansi clear from output
Joshix-1 cfdb196
fix typo
Joshix-1 08dce84
move ansi escape hack to impl From<git2_hooks::HookResult> for HookRe…
Joshix-1 b37817d
fix ansi clear
Joshix-1 a7fe9cb
try strip different
Joshix-1 a4e2f54
more trimming
Joshix-1 d25efdc
Revert "more trimming"
Joshix-1 caf83c8
weird hack only on windows
Joshix-1 f91aa10
revert stuff
Joshix-1 adeb50d
trim_ascii_end
Joshix-1 c5c1fe9
format assert
Joshix-1 c0a8996
move truncation
Joshix-1 3e4b3c2
debug
Joshix-1 4601892
Merge remote-tracking branch 'extrawurst/master' into git-hooks-shell…
Joshix-1 db60ac3
fix test
Joshix-1 5a1dfbd
fix windows
Joshix-1 94b9dc7
add missing argument
Joshix-1 f9ff366
add argument
Joshix-1 38a3484
remove hacks
Joshix-1 7b4903b
correctly escape single-quote if utf8
Joshix-1 0b3d2c0
less indentation
Joshix-1 a0b7503
test if string contains single-quote
Joshix-1 f58f550
replace single-quotes in string
Joshix-1 9b8a87e
add test with invalid utf8
Joshix-1 b54711f
Merge remote-tracking branch 'extrawurst/master' into git-hooks-shell…
Joshix-1 418d016
fix tests with invalid utf8
Joshix-1 f2d41fd
fix generating invalid utf8 ostring
Joshix-1 40179d5
remove dead_code
Joshix-1 16e150e
dereference
Joshix-1 2796f8f
try different string on windows
Joshix-1 ee8fcf9
only valid unicode paths are accepted on windows
Joshix-1 eaad1f3
remove unused import
Joshix-1 48922ce
revert returning error
Joshix-1 9649e84
test if string contains single-quote
Joshix-1 c74e762
make clippy happy
Joshix-1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably fail here if there is a single-quote in the string. Trying to execute something where we know it will fail sounds like a bad idea.
Escaping stuff in non-utf8 is hard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fully agree.