Questions tagged [git-diff-tree]

git-diff-tree is a git command that compares the content and mode of blobs found via two tree objects.

git-diff-tree is a git command that compares the content and mode of blobs found via two tree objects.

https://www.kernel.org/pub/software/scm/git/docs/git-diff-tree.html

22 questions
0
votes
1 answer

git diff-tree shows no output

I have read that the following command allows you to see all changed files of the last commit: git diff-tree --no-commit-id --diff-filter=d --name-only -r $(Build.SourceVersion) Unfortunately I have no luck, the command does not show anything. How…
Edoardo
  • 13
  • 5
0
votes
1 answer

Git diff-tree always print full commit hash

I'd like to get the abbreviated commit hash of HEAD using diff-tree, but I've tried all the following, all of which output a full commit hash: git diff-tree --no-patch --abbrev-commit HEAD git diff-tree --no-patch --abbrev=10 HEAD git diff-tree…
lzhh
  • 852
  • 7
  • 16
0
votes
0 answers

How can I get a list of files changed in a git commit?

I need a list of files (specifically regular files, not symlinks, directories, submodules, etc.) changed in a git commit. I am aware (as in e.g. this answer)that git diff-tree --name-status gives quite useful output showing a list of changed objects…
Caleb
  • 5,084
  • 1
  • 46
  • 65
0
votes
1 answer

Git alias does not print output of command

I have the following git alias [alias] remaster = !"git checkout $1 & git diff-tree -r --patch --diff-filter=DM $1..master" When using the above command by hand I get the following stdout: $ git diff-tree -r --patch development..master…
xetra11
  • 7,671
  • 14
  • 84
  • 159
0
votes
2 answers

How can I diff a tree and a remote branch in git?

I need to diff two objects in git. One is a tree (directory) in my working directory, and the other one is a remote branch. I can do so if I find the SHA of the tree and use that in the argument of my git diff command along with the remote branch.…
MrAliB
  • 799
  • 9
  • 17
0
votes
1 answer

Exclude files from git diff-tree

I execute command: git diff-tree --diff-filter=ACMR --no-commit-id --name-only -r $COMMIT^1.. -- from the result I create zip archive. How can I exclude specific files from the result generated by the above command ?
takeit
  • 3,991
  • 1
  • 20
  • 36
-1
votes
2 answers

Batch run for "git diff-tree"

I need to find the changes made by each commit. So I used git log to find the list of all commits. Then I use git diff-tree current-commit previous-commit [some other options] to find the changes. The problem is the repo has more than 3000 commits,…
Philippe
  • 20,025
  • 2
  • 23
  • 32
1
2