* [PATCH] subtree: hide GPG signatures in calls to log @ 2018-02-16 3:34 Stephen R Guglielmo [not found] ` <CADfK3RVMxv8RPYS34jhLq=0TievNwwKH2fgn=knPjxraXN=wUw@mail.gmail.com> 0 siblings, 1 reply; 2+ messages in thread From: Stephen R Guglielmo @ 2018-02-16 3:34 UTC (permalink / raw) To: git; +Cc: Avery Pennarun, Stefan Beller This fixes `add` and `pull` for GPG signed objects. Signed-off-by: Stephen R Guglielmo <srg@guglielmo.us> --- contrib/subtree/git-subtree.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index dec085a23..9594ca4b5 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -297,7 +297,7 @@ find_latest_squash () { main= sub= git log --grep="^git-subtree-dir: $dir/*\$" \ - --pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD | + --no-show-signature --pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD | while read a b junk do debug "$a $b $junk" @@ -341,7 +341,7 @@ find_existing_splits () { main= sub= git log --grep="^git-subtree-dir: $dir/*\$" \ - --pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs | + --no-show-signature --pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs | while read a b junk do case "$a" in @@ -382,7 +382,7 @@ copy_commit () { # We're going to set some environment vars here, so # do it in a subshell to get rid of them safely later debug copy_commit "{$1}" "{$2}" "{$3}" - git log -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' "$1" | + git log --no-show-signature -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' "$1" | ( read GIT_AUTHOR_NAME read GIT_AUTHOR_EMAIL @@ -462,8 +462,8 @@ squash_msg () { oldsub_short=$(git rev-parse --short "$oldsub") echo "Squashed '$dir/' changes from $oldsub_short..$newsub_short" echo - git log --pretty=tformat:'%h %s' "$oldsub..$newsub" - git log --pretty=tformat:'REVERT: %h %s' "$newsub..$oldsub" + git log --no-show-signature --pretty=tformat:'%h %s' "$oldsub..$newsub" + git log --no-show-signature --pretty=tformat:'REVERT: %h %s' "$newsub..$oldsub" else echo "Squashed '$dir/' content from commit $newsub_short" fi @@ -475,7 +475,7 @@ squash_msg () { toptree_for_commit () { commit="$1" - git log -1 --pretty=format:'%T' "$commit" -- || exit $? + git rev-parse --verify "$commit^{tree}" || exit $? } subtree_for_commit () { -- 2.16.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
[parent not found: <CADfK3RVMxv8RPYS34jhLq=0TievNwwKH2fgn=knPjxraXN=wUw@mail.gmail.com>]
* Re: [PATCH] subtree: hide GPG signatures in calls to log [not found] ` <CADfK3RVMxv8RPYS34jhLq=0TievNwwKH2fgn=knPjxraXN=wUw@mail.gmail.com> @ 2018-02-22 18:52 ` Stefan Beller 0 siblings, 0 replies; 2+ messages in thread From: Stefan Beller @ 2018-02-22 18:52 UTC (permalink / raw) To: Stephen R Guglielmo; +Cc: git, Avery Pennarun On Thu, Feb 22, 2018 at 5:37 AM, Stephen R Guglielmo <srguglielmo@gmail.com> wrote: > On Feb 15, 2018 10:34 PM, "Stephen R Guglielmo" <srguglielmo@gmail.com> > wrote: > > This fixes `add` and `pull` for GPG signed objects. > > Signed-off-by: Stephen R Guglielmo <srg@guglielmo.us> Yay! Thanks for a patch! I had to go back to the discussion https://public-inbox.org/git/CADfK3RV1qo_jP=WD6ZF2U9bH2Xf+GJWbC9T4a3YK+C08O0O50Q@mail.gmail.com/ to really understand what is happening here. Can you give a summary and explanation in the commit message? (What is the current bug, how is it triggered, and why this is the best way to fix it? That would be essentially repeating https://public-inbox.org/git/CADfK3RWAcb0m+m_U51JLA9tNyru_7XEsfy55i5EUsKh98jGFtA@mail.gmail.com/) Now that I read the discussion, I think the code is fine. Reviewed-by: Stefan Beller <sbeller@google.com> > --- > contrib/subtree/git-subtree.sh | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh > index dec085a23..9594ca4b5 100755 > --- a/contrib/subtree/git-subtree.sh > +++ b/contrib/subtree/git-subtree.sh > @@ -297,7 +297,7 @@ find_latest_squash () { > main= > sub= > git log --grep="^git-subtree-dir: $dir/*\$" \ > - --pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD | > + --no-show-signature --pretty=format:'START %H%n%s%n%n%b%nEND%n' > HEAD | > while read a b junk > do > debug "$a $b $junk" > @@ -341,7 +341,7 @@ find_existing_splits () { > main= > sub= > git log --grep="^git-subtree-dir: $dir/*\$" \ > - --pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs | > + --no-show-signature --pretty=format:'START %H%n%s%n%n%b%nEND%n' > $revs | > while read a b junk > do > case "$a" in > @@ -382,7 +382,7 @@ copy_commit () { > # We're going to set some environment vars here, so > # do it in a subshell to get rid of them safely later > debug copy_commit "{$1}" "{$2}" "{$3}" > - git log -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' "$1" | > + git log --no-show-signature -1 > --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' "$1" | > ( > read GIT_AUTHOR_NAME > read GIT_AUTHOR_EMAIL > @@ -462,8 +462,8 @@ squash_msg () { > oldsub_short=$(git rev-parse --short "$oldsub") > echo "Squashed '$dir/' changes from $oldsub_short..$newsub_short" > echo > - git log --pretty=tformat:'%h %s' "$oldsub..$newsub" > - git log --pretty=tformat:'REVERT: %h %s' "$newsub..$oldsub" > + git log --no-show-signature --pretty=tformat:'%h %s' > "$oldsub..$newsub" > + git log --no-show-signature --pretty=tformat:'REVERT: %h %s' > "$newsub..$oldsub" > else > echo "Squashed '$dir/' content from commit $newsub_short" > fi > @@ -475,7 +475,7 @@ squash_msg () { > > toptree_for_commit () { > commit="$1" > - git log -1 --pretty=format:'%T' "$commit" -- || exit $? > + git rev-parse --verify "$commit^{tree}" || exit $? > } > > subtree_for_commit () { > -- > 2.16.1 > > > > Hi all, just following up on this as I haven't heard any feedback. > > Thanks, > Steve ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-22 18:52 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-02-16 3:34 [PATCH] subtree: hide GPG signatures in calls to log Stephen R Guglielmo [not found] ` <CADfK3RVMxv8RPYS34jhLq=0TievNwwKH2fgn=knPjxraXN=wUw@mail.gmail.com> 2018-02-22 18:52 ` Stefan Beller
Code repositories for project(s) associated with this public inbox https://80x24.org/mirrors/git.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).