Add oids to push --dry-run output otherwise can't see modifications

This commit is contained in:
Steve Streeting 2015-08-26 11:26:50 +01:00
parent e8a21619a9
commit 41cdd013c2
3 changed files with 5 additions and 3 deletions

@ -90,7 +90,7 @@ func prePushCommand(cmd *cobra.Command, args []string) {
for _, pointer := range pointers { for _, pointer := range pointers {
if prePushDryRun { if prePushDryRun {
Print("push %s", pointer.Name) Print("push %s [%s]", pointer.Name, pointer.Oid)
continue continue
} }

@ -40,7 +40,7 @@ func uploadsBetweenRefs(left string, right string) *lfs.TransferQueue {
uploadQueue := lfs.NewUploadQueue(len(pointers), totalSize, pushDryRun) uploadQueue := lfs.NewUploadQueue(len(pointers), totalSize, pushDryRun)
for i, pointer := range pointers { for i, pointer := range pointers {
if pushDryRun { if pushDryRun {
Print("push %s", pointer.Name) Print("push %s [%s]", pointer.Name, pointer.Oid)
continue continue
} }

@ -41,7 +41,9 @@ begin_test "push dry-run"
git add .gitattributes a.dat git add .gitattributes a.dat
git commit -m "add a.dat" git commit -m "add a.dat"
[ "push a.dat" = "$(git lfs push --dry-run origin master 2>&1)" ] git lfs push --dry-run origin master 2>&1 | tee push.log
grep "push a.dat" push.log
[ $(wc -l < push.log) -eq 1 ]
git checkout -b push-b git checkout -b push-b
echo "push b" > b.dat echo "push b" > b.dat