@@ -241,15 +241,39 @@ - (void) showTagInfoSheet:(PBRefMenuItem *)sender
241
241
if ([[sender refish ] refishType ] != kGitXTagType )
242
242
return ;
243
243
244
- NSString *tagName = [(PBGitRef *)[sender refish ] tagName ];
245
-
244
+ PBGitRef *ref = (PBGitRef*)[sender refish ];
245
+ NSMutableString *info = [NSMutableString new ];
246
+
247
+ NSArray *remotes = [historyController.repository remotes ];
248
+ if (remotes)
249
+ {
250
+ for (int i=0 ; i<[remotes count ]; i++)
251
+ {
252
+ if ([historyController.repository isRemoteConnected: [PBGitRef refFromString: [NSString stringWithFormat: @" %@%@ " ,kGitXRemoteRefPrefix ,[remotes objectAtIndex: i]]]])
253
+ {
254
+ [info appendFormat: @" On remote %@ :\n %@ \n\n " ,[remotes objectAtIndex: i],[historyController.repository tagExistsOnRemote: ref remoteName: [remotes objectAtIndex: i]]?@" Yes" :@" No" ];
255
+ }
256
+ else
257
+ {
258
+ [info appendFormat: @" Remote %@ is not connected!\n Can't check, if tag %@ exists.\n\n " ,[remotes objectAtIndex: i],[ref tagName ]];
259
+ }
260
+ }
261
+ }
262
+
246
263
int retValue = 1 ;
247
- NSArray *args = [NSArray arrayWithObjects: @" tag" , @" -n50" , @" -l" , tagName, nil ];
248
- NSString *info = [historyController.repository outputInWorkdirForArguments: args retValue: &retValue];
249
- if (!retValue) {
250
- NSString *message = [ NSString stringWithFormat: @" Info for tag: %@ " , tagName];
251
- [historyController.repository.windowController showMessageSheet: message infoText: info ];
264
+ NSArray *args = [NSArray arrayWithObjects: @" tag" , @" -n50" , @" -l" , [ref tagName ] , nil ];
265
+ NSString *output = [historyController.repository outputInWorkdirForArguments: args retValue: &retValue];
266
+ if (!retValue)
267
+ {
268
+ [info appendFormat: @" Annotation or Commitmessage: \n %@ " ,output ];
252
269
}
270
+ else
271
+ {
272
+ [info appendFormat: @" Error:\n git tag -n50 -l %@ \n\n %@ " ,[ref tagName ],output];
273
+ }
274
+
275
+ NSString *message = [NSString stringWithFormat: @" Info for tag: %@ " , [ref tagName ]];
276
+ [historyController.repository.windowController showMessageSheet: message infoText: info];
253
277
}
254
278
255
279
0 commit comments